For Web Developers
What is Service Worker?
- Install Chrome Canary (Linux users can build Chromium, Android users can build ChromeShell.)
- Open the browser and enable the Experimental Web Platform Features flag by cutting and pasting this URL: chrome://flags/#enable-experimental-web-platform-features . Enable the Experimental Web Platform Features option, then restart the browser.
- Download service-worker-demo.zip found at the bottom of this page and extract it.
- Start a local server in that folder. This is hard if you have never done it before. Ask a buddy or search!
Open http://localhost:8080/index.html (or whatever path and port you set up.) Open the Inspector. Things are logged there later on.Try visiting Cleveland and get a 404. Go back.Click the 'Register' button, watch the Inspector console, then try visiting Cleveland again... oooh.Go to chrome://inspect#service-workers and click on Inspect to open the Inspector and debug a Service Worker. There are also some rudimentary debugging tools in chrome://serviceworker-internals .
- Dominic recommends twistd -n web --path . --port 8080 on Linux
- Kenji recommends python -m SimpleHTTPServer 8080 on Windows/Mac
W3C Web & Mobile Interest Group maintains a set of Service Worker demos you can experiment with. The implementation in Chrome may not be complete enough to run any of these yet. Contributing to these is a great way for web developers to contribute to the Service Worker effort.
Go to http://crbug.com/new
and include "Service Worker" in the summary. You should get a response from an engineer in about one week.
If the browser crashed while you were doing Service Worker development, go to chrome://crashes and cut and paste the Crash ID into the bug report. This kind of bug report is very valuable to us. (If you do not see crashes in chrome://crashes it may be because you chose not to send usage statistics and crash reports to Google. You can change this option in chrome://settings .)
Feedback from hands-on experience is highly appreciated. Here are the different venues you might want to consider:
Is Service Worker Ready?
tracks the implementation status of Service Worker at a fine-grained, feature-by-feature level in many popular browsers.
For Chromium & Blink Contributors
...interested web developers are welcome to poke around too!