Closed JamieMason closed 7 years ago
I was affected by this gotcha where you need to avoid any cache headers on the ServiceWorker JS file, setting the cache to max-age=0
solves the problem.
I was using the http-server npm package and learned after reading this that it sets max-age=2600
by default. Starting the server using -c-1
disables that so your service worker behaves more predictably.
http-server -c-1 -p 8081
Thanks for this great course.
I've reached as far as 8. Support native integration, created the manifest.json, and added the following to my index.html;
cacheName
var.But I still see the version of index.html from before I added these meta tags. If someone could give me some pointers that would be great. As far as I can tell, I don't think the
'activate'
event is firing.Thanks.