Service Worker In Action

Caching Pages and working offline - v1.5

Check what is going on with:

views

How to work with this example

  1. Load the 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 Chrome 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.

For more checkout Ido's Projects

Last Update: 12/4/2015