It's online. It's offline. It's a Service Worker!
Перейти к файлу
Salvador de la Puente González c29a94fb40 Changing the name of the recipe too. 2016-10-13 15:50:37 +02:00
_recipe_template Adding common assets for offline strategies recipes 2016-09-19 17:38:58 +02:00
api-analytics Use ellipsis character instead of three points 2015-12-28 13:23:35 +01:00
cache-from-zip Resolve #157 - Create sort order for sidebar 2015-12-10 09:58:29 -06:00
cache-then-network README cleanup for consistency 2015-12-08 11:39:04 -06:00
dependency-injector Update eslint-config-airbnb to version 4 2016-01-23 12:23:47 +00:00
fetching Relying on html client rectangle for determining the iframe size 2016-09-17 18:01:25 +02:00
imgs/random Adding common assets for offline strategies recipes 2016-09-19 17:38:58 +02:00
immediate-claim fix typo 2016-03-01 14:10:42 +01:00
json-cache README cleanup for consistency 2015-12-08 11:39:04 -06:00
live-flowchart Updating screenshot URLs 2016-02-22 17:58:35 +01:00
load-balancer Clarifying how to use the demo 2015-12-11 18:37:22 +01:00
message-relay Delete chrome warning from README 2016-07-29 10:49:01 -07:00
offline-fallback README cleanup for consistency 2015-12-08 11:39:04 -06:00
offline-status README cleanup for consistency 2015-12-08 11:39:04 -06:00
push-clients Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-get-payload Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-payload Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-quota Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-replace Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-rich Point to the latest WebPush IETF drafts 2016-03-30 13:18:17 -05:00
push-simple Merge pull request #224 from callahad/update-spec-refs 2016-03-30 20:30:20 +02:00
push-subscription-management Fix broken link in the Push Subscription recipe. Fixes #205 2016-02-17 11:25:11 +00:00
render-store Add proxy to images as well 2015-12-30 12:57:02 +01:00
request-deferrer Update eslint-config-airbnb to version 4 2016-01-23 12:23:47 +00:00
src Adding lorempixel.com pictures attribution 2016-09-26 14:45:33 +02:00
strategy-cache-and-update Cache and update strategy 2016-10-05 17:57:20 +02:00
strategy-cache-only Cache only strategy 2016-10-05 16:55:08 +02:00
strategy-cache-update-and-refresh Cache, update and refresh strategy 2016-10-05 17:33:27 +02:00
strategy-embedded-fallback Changing the name of the recipe too. 2016-10-13 15:50:37 +02:00
strategy-network-or-cache Network or cache strategy 2016-10-05 18:00:24 +02:00
virtual-server Relying on html client rectangle for determining the iframe size 2016-09-17 18:01:25 +02:00
.eslintignore Add root files to .eslintignore (we don't need them to be 80 char max) 2015-11-26 12:18:59 +00:00
.eslintrc Update eslint-config-airbnb to version 4 2016-01-23 12:23:47 +00:00
.gitignore - First recipes, auto-claim and offline fallback 2015-09-28 17:36:07 -07:00
.travis.yml Don't build on Heroku; build on Travis and deploy the result 2015-11-20 13:35:19 +00:00
LICENSE Initial commit 2015-09-22 10:28:47 -07:00
Procfile amend 2015-09-30 14:20:05 -07:00
README.md Adding lorempixel.com pictures attribution 2016-09-26 14:45:33 +02:00
favicon.ico Favicon 2015-09-29 14:11:10 -07:00
gulpfile.js Adding common assets for offline strategies recipes 2016-09-19 17:38:58 +02:00
package.json Rewording description 2016-10-13 08:37:27 +02:00
parseRecipes.js Adding common assets for offline strategies recipes 2016-09-19 17:38:58 +02:00
server.js Fix #190 - Remove index.html from homepage URL 2016-03-30 09:53:31 -05:00

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.