Open itaditya opened 4 years ago
I can work on this one tonight
Thanks for picking this task. Some starting points-
To do this, you'll need to ensure that index.html is not cached. Reason is when a new build is made, the index.html will have asset paths updated to new hash. Then when a user opens the website, the new index.html will ask for new hashed paths instead of old cached paths. So we'll be able to push new changes if we need to. If there is no change in code, the index.html will keep requesting old hashed assets and they'll be served from cache.
I have a working Service Worker with assets support here : https://github.com/itaditya/trick-or-treat-game/pull/33
Currently all the js, css and images can be cached via service worker so people can play the game offline as well as a PWA on a phone.