{"id":13432671,"url":"https://github.com/mdn/serviceworker-cookbook","last_synced_at":"2025-09-29T00:31:23.683Z","repository":{"id":41245262,"uuid":"42949529","full_name":"mdn/serviceworker-cookbook","owner":"mdn","description":"It's online. It's offline. It's a Service Worker!","archived":true,"fork":false,"pushed_at":"2022-11-01T15:06:45.000Z","size":6894,"stargazers_count":2761,"open_issues_count":52,"forks_count":330,"subscribers_count":74,"default_branch":"master","last_synced_at":"2024-04-13T18:48:21.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-22T17:28:47.000Z","updated_at":"2024-04-12T09:59:38.000Z","dependencies_parsed_at":"2022-07-21T22:00:12.640Z","dependency_job_id":null,"html_url":"https://github.com/mdn/serviceworker-cookbook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fserviceworker-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fserviceworker-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fserviceworker-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fserviceworker-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdn","download_url":"https://codeload.github.com/mdn/serviceworker-cookbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234575224,"owners_count":18854925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:15.036Z","updated_at":"2025-09-29T00:31:18.052Z","avatar_url":"https://github.com/mdn.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# ServiceWorker Cookbook\n\n[![Build Status](https://travis-ci.org/mozilla/serviceworker-cookbook.svg?branch=master)](https://travis-ci.org/mozilla/serviceworker-cookbook)\n[![dependencies](https://david-dm.org/mozilla/serviceworker-cookbook.svg)](https://david-dm.org/mozilla/serviceworker-cookbook)\n[![devdependencies](https://david-dm.org/mozilla/serviceworker-cookbook/dev-status.svg)](https://david-dm.org/mozilla/serviceworker-cookbook?type=dev)\n\nIt's online. It's offline. It's a Service Worker!\n\nService workers are a new technology to aid developers in:\n\n- creating realistic, reliable offline experiences\n- vastly improving performance when online\n- logically and dynamically caching files for any purpose\n\nThe 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!\n\n## What is in this cookbook?\n\nThis 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:\n\n- [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)\n- [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)\n- [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache)\n- [Push](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n- [Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n- [BackgroundSync](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/sync)\n\n## How to contribute\n\nWe are always happy to accept contributions!  You can follow the process below to start creating a new recipe:\n\n1.  Clone this repository\n2.  Execute `cd serviceworker-cookbook \u0026\u0026 npm install`\n3.  Copy the `_recipe_template` directory, rename it, and add all recipe code and resources within that new directory\n3.  Execute `gulp watch` to start the server\n4.  Navigate to http://localhost:3000 to develop and test your recipe\n\nWhen it's all done, please submit a pull request to the [ServiceWorker Cookbook](https://github.com/mozilla/serviceworker-cookbook).\n\n## Similar projects \u0026 prior art\n\n- [Google Chrome Service Worker Samples](https://github.com/GoogleChrome/samples/tree/gh-pages/service-worker)\n- [Is ServiceWorker Ready?](https://github.com/jakearchibald/isserviceworkerready/tree/gh-pages/demos)\n- [Embrace The Network](https://github.com/phamann/embrace-the-network)\n- [The Offline Cookbook](https://jakearchibald.com/2014/offline-cookbook/)\n\n# Attributions\n\n[MealKeeper Icon](https://www.iconfinder.com/icons/51445/cook_book_recipe_group_icon) by [Shlyapnikova](http://shlyapnikova.deviantart.com/), [Creative Commons (Attribution 3.0 Unported)](http://creativecommons.org/licenses/by/3.0/)\n\nAttribution of pictures in Caching strategies category can be found at [lorempixel.com](http://lorempixel.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdn%2Fserviceworker-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdn%2Fserviceworker-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdn%2Fserviceworker-cookbook/lists"}