- The "start" folder contains the base site from which we will work.
- The "finished" folder contains the completed site. If you get stuck, you can see how things were done there.
Grab:
In Firefox, go to "about:config", and type "serviceworkers". Make sure everything is set to "true".
Also enable "devtools.debugger.workers
" in about:config.
Git clone (or fork) this repo:
git clone https://github.com/marcoscaceres/sw-workshop.git
In the terminal, got to "start" and start a web server:
python -m SimpleHTTPServer
REMEMBER: All the caches are working against you trying to ruin your day.
- In Firefox, go to about:serviceworkers
- In Chrome, go to about:serviceworker-internals
I suggest you bookmark those or "pin" them!
Navigate to http://localhost:8000.
We will be working on two files in the start folder:
- registration.js (client registration)
- sw.js (worker)