Skip to content
It's online. It's offline. It's a Service Worker!
JavaScript HTML CSS
Branch: master
Clone or download
Pull request Compare This branch is even with mozilla:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_recipe_template
api-analytics
cache-from-zip
cache-then-network
dependency-injector
fetching
imgs/random
immediate-claim
json-cache
live-flowchart
load-balancer
local-download
message-relay
offline-fallback
offline-status
push-clients
push-get-payload
push-payload
push-quota
push-replace
push-rich
push-simple
push-subscription-management
render-store
request-deferrer
src
strategy-cache-and-update
strategy-cache-only
strategy-cache-update-and-refresh
strategy-embedded-fallback
strategy-network-or-cache
virtual-server
.eslintignore
.eslintrc
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
LICENSE
Procfile
README.md
favicon.ico
gulpfile.js
package.json
parseRecipes.js
server.js
tools.js

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.

You can’t perform that action at this time.