SW Helpers
The Libraries
sw-appcache-behavior
A service worker implementation of the behavior defined in a page's App Cache manifest.
Install: npm install --save-dev sw-appcache-behavior
Learn More: About • Demo • API
sw-background-sync-queue
A service worker implementation of the a queue which is triggered by the background sync event.
Install: npm install --save-dev sw-background-sync-queue
Learn More: About • Demo • API
sw-broadcast-cache-update
A helper library that uses the Broadcast Channel API to announce when two Response objects differ.
Install: npm install --save-dev sw-broadcast-cache-update
Learn More: About • Demo • API
sw-cache-expiration
This library is still a work in progress and is not functional.
Install: npm install --save-dev sw-cache-expiration
Learn More: About • Demo • API
sw-lib
A service worker library to make managing fetch requests and caching as easy as possible.
Install: npm install --save-dev sw-lib
Learn More: About • Demo • API
sw-offline-google-analytics
A service worker helper library to retry offline Google Analytics requests when a connection is available.
Install: npm install --save-dev sw-offline-google-analytics
Learn More: About • Demo • API
sw-precaching
This library is still a work in progress and is not functional.
Install: npm install --save-dev sw-precaching
Learn More: About • Demo • API
sw-routing
A service worker helper library to route request URLs to handlers.
Install: npm install --save-dev sw-routing
Learn More: About • Demo • API
sw-runtime-caching
A service worker helper library that implements various runtime caching strategies.
Install: npm install --save-dev sw-runtime-caching
Learn More: About • Demo • API
External Contributions
Please read the guide to contributing prior to filing any pull requests.
License
Copyright 2016 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.