It's online. It's offline. It's a Service Worker!
JavaScript HTML CSS
Latest commit 0f525c1 Oct 17, 2016 @marco-c marco-c committed on GitHub Merge pull request #255 from delapuente/adding-comments
Adding Disqus comments
Permalink
Failed to load latest commit information.
_recipe_template Adding common assets for offline strategies recipes Sep 19, 2016
api-analytics Use ellipsis character instead of three points Dec 28, 2015
cache-from-zip Resolve #157 - Create sort order for sidebar Dec 10, 2015
cache-then-network README cleanup for consistency Dec 8, 2015
dependency-injector Update eslint-config-airbnb to version 4 Jan 23, 2016
fetching Relying on html client rectangle for determining the iframe size Sep 17, 2016
imgs/random Adding common assets for offline strategies recipes Sep 19, 2016
immediate-claim fix typo Mar 1, 2016
json-cache README cleanup for consistency Dec 8, 2015
live-flowchart Updating screenshot URLs Feb 22, 2016
load-balancer Clarifying how to use the demo Dec 11, 2015
message-relay Delete chrome warning from README Jul 29, 2016
offline-fallback README cleanup for consistency Dec 8, 2015
offline-status README cleanup for consistency Dec 8, 2015
push-clients Point to the latest WebPush IETF drafts Mar 30, 2016
push-get-payload Point to the latest WebPush IETF drafts Mar 30, 2016
push-payload Point to the latest WebPush IETF drafts Mar 30, 2016
push-quota Point to the latest WebPush IETF drafts Mar 30, 2016
push-replace Point to the latest WebPush IETF drafts Mar 30, 2016
push-rich Point to the latest WebPush IETF drafts Mar 30, 2016
push-simple Merge pull request #224 from callahad/update-spec-refs Mar 30, 2016
push-subscription-management Fix broken link in the Push Subscription recipe. Fixes #205 Feb 17, 2016
render-store Add proxy to images as well Dec 30, 2015
request-deferrer Update eslint-config-airbnb to version 4 Jan 23, 2016
src Adding Disqus comments Oct 17, 2016
strategy-cache-and-update Cache and update strategy Oct 5, 2016
strategy-cache-only Cache only strategy Oct 5, 2016
strategy-cache-update-and-refresh Cache, update and refresh strategy Oct 5, 2016
strategy-embedded-fallback Changing the name of the recipe too. Oct 13, 2016
strategy-network-or-cache Network or cache strategy Oct 5, 2016
virtual-server Relying on html client rectangle for determining the iframe size Sep 17, 2016
.eslintignore Add root files to .eslintignore (we don't need them to be 80 char max) Nov 26, 2015
.eslintrc Update eslint-config-airbnb to version 4 Jan 23, 2016
.gitignore - First recipes, auto-claim and offline fallback Sep 29, 2015
.travis.yml Don't build on Heroku; build on Travis and deploy the result Nov 20, 2015
LICENSE Initial commit Sep 22, 2015
Procfile amend Sep 30, 2015
README.md Adding lorempixel.com pictures attribution Sep 26, 2016
favicon.ico Favicon Sep 29, 2015
gulpfile.js Adding common assets for offline strategies recipes Sep 19, 2016
package.json Rewording description Oct 13, 2016
parseRecipes.js Adding common assets for offline strategies recipes Sep 19, 2016
server.js Fix #190 - Remove index.html from homepage URL Mar 30, 2016

README.md

ServiceWorker Cookbook

Build Status dependencies devdependencies

It's online. It's offline. It's a Service Worker!

Service workers are a new technology to aid developers in:

- creating realistic, reliable offline experiences
- vastly improving performance when online
- logically and dynamically caching files for any purpose

The ServiceWorker API, which has recently made its way into Firefox Developer Edition, will change the way web and mobile app developers make their websites fast and functional!

What is in this cookbook?

This cookbook contains dozens of practical, detailed, and working examples of service worker usage. These examples are for developers from beginner to expert and illustrate a number of APIs:

How to contribute

We are always happy to accept contributions! You can follow the process below to start creating a new recipe:

  1. Clone this repository
  2. Execute cd serviceworker-cookbook && npm install
  3. Copy the _recipe_template directory, rename it, and add all recipe code and resources within that new directory
  4. Execute gulp watch to start the server
  5. Navigate to http://localhost:3000 to develop and test your recipe

When it's all done, please submit a pull request to the ServiceWorker Cookbook.

Similar projects & prior art

Attributions

MealKeeper Icon by Shlyapnikova, Creative Commons (Attribution 3.0 Unported)

Attribution of pictures in Caching strategies category can be found at lorempixel.com.