Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
appcache-autoupdate
Advanced tools
Readme
Auto Updates for Offline First Applications
Install using bower for usage in browser:
bower install --save appcache-autoupdate
Make sure the manifest
attribute is set on the <html>
tag.
<html manifest="appcache.manifest">
<script src="appache-autoupdate.js">
AutoUpdate starts checking automatically for updates every
30 seconds. To prevent that, add data-autoupdate="false"
.
You can also alter the check interval by setting a time
in ms: data-autoupdate="10000"
.
The JS API:
// event API
AutoUpdate.on('updateready', reloadPage)
// AutoUpdate also offers reliable online/offline events
// in case the cache manifest could not be downloaded
AutoUpdate.on('offline', showOfflineIndicator)
AutoUpdate.on('online', hideOfflineIndicator)
// set interval for checking for updates in ms
// (default is 30000)
AutoUpdate.setInterval(60000)
// set alternative interval when offline
AutoUpdate.setOfflineInterval(30000)
// reload page when routing, if update is ready
function onRoute(event) {
if (AutoUpdate.hasUpdate()) {
location.reload(1)
}
}
I extracted appCache-autoupdate.js
out of minutes.io, which is an Offline First
web application, anno 2011. It's battle tested by a ton of users, devices, internet environment.
minutes.io checks every 30 seconds if an update is available. And whenever the user navigates from one view to another, it reloads the page in case there is. As the assets are all cached, the user cannot tell that his page got just reloaded. It's silent, without any notification, or a prompt asking the user to reload the page. And it works very well so far.
I don't have a demo app ready yet, I'm happily accepting pull requests though. But here's my idea for a tiny node.js app, hosted for free on Heroku or whereever:
appcache.manifest
that changes every 30stheme.css
that changes the background color every time it gets requestedappCache Autoupdate has been authored by Gregor Martynus, proud member of Team Hoodie. Support our work: gittip us.
License: MIT
FAQs
Browser library for automated updates of offline first applications
We found that appcache-autoupdate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.