Skip to content

greenido/service-worker-caching-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Service Worker - Caching your web application or web site

How to try this example

  1. Load the main page
  2. The 'Install' action will take place. Follow the links on the page (e.g chrome://serviceworker-internals/ ) to 'see' better what is going on.
  3. Reload the page with your devtools open.
  4. See the log messages.
  5. Make sure you don't have connection (kill the wifi etc').
  6. Click on the 'Reload' button and boom you got a page that they Service work sent you with its Javascript, css and image.
  7. You can take the code chagne the version number in the page and the serviceWorker and see how it will update itself. (!) Make sure to close all the open tabs/windows of the last version of your web app/site.

Todo

  • Improve the detection of SW.
  • Create a smarter example for responsive images

Analytics

About

service worker caching example for web sites and web apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published