Service Worker In Action
Caching Pages and working offline - v1.5
Check what is going on with:
- chrome://serviceworker-internals/
- chrome://inspect/#service-workers
How to work with this example
-
Load the
page
-
The 'Install' action will take place. Follow the links on the page (e.g chrome://serviceworker-internals/ ) to 'see' better what is going on.
- Reload the page with your Chrome DevTools open.
- See the log messages.
- Make sure you don't have connection (kill the wifi etc').
-
Click on the 'Reload' button and *boom* you got a page that they Service work sent you with its Javascript, css and image.
-
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.
Last Update: 12/4/2015