
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
A gulp plugin to make your web app work offline.
Once applied to your app, this plugin code caches all your frontend assets using service workers if supported.
If not, AppCache is used. In this mode, the main page is redirected to an empty page that uses appcache to cache your assets. When all the caching operations are done, the user is redirected back to the main page. This redirection only happens once.
Please note that it will only work on web app served over https.
Make sure to serve the web app over https.
This plugin uses the library ServiceWorkerWare to provide the integration with Service Worker. The AppCache manifest is generated by node-appcache-generator.
The steps this plugin provide are the following:
index.html page to install the caching logic.var sww = require('gulp-sww');
gulp.task('offline', function() {
return gulp.src('**/*', { cwd : '<your working directory>' } )
.pipe(sww())
.pipe(gulp.dest('<output directory>'));
});
By default, the index.html page is modified but you can specify a different
entry point:
gulp.task('offline', function() {
return gulp.src('**/*', { cwd : '<your working directory>' } )
.pipe(sww({ entryPoint: 'main.html' }))
.pipe(gulp.dest('<output directory>'));
});
You can find a simple example in the examples/app1 and examples/app2
folders, just execute gulp from these directories to see how the content is
modified.
Also here you can find how this plugin has been used to add offline support to a HTML5 game by LadyBenko.
This plugin requires node version >= 4.2.0.
FAQs
A gulp plugin to make your web app work offline.
We found that gulp-sww 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.