dumberjs / dumber-gist

A lightweight online IDE to write JS SPA prototypes in your own GitHub gists.
https://gist.dumber.app
MIT License
28 stars 2 forks source link

TODO: add offline support #14

Closed 3cp closed 4 years ago

3cp commented 4 years ago

Add another service worker to the main domain gist.dumber.app to cache index.html and all js files.

So the app can work largely without downloading again. This can boost performance.

Need to check latest index.html to invalid old offline cache, maybe don't cache index.html, just cache js files.

3cp commented 4 years ago

Shelve branch offline-support.

It seems defeating the purpose to use service worker to catch bundled js files. If user turned off cache in dev tool, the service worker does not help on performance, the caches are bypassed. If user didn't turn off cache in dev tool, the normal HTTP cache on the bundled js files (with expire header set to 365 days) does the job with far less complexity.