docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.7k stars 5.68k forks source link

Service Worker Cache Expiration #190

Open Kikobeats opened 7 years ago

Kikobeats commented 7 years ago

I noted after sucesive improvements at https://mythbusters.js.org the website cached a old version of the web and it's necessary a hard refresh for fetch the new version.

Could be interesting implement a way to auto-expire the cache after a period of time (for example, 5 day).

jrappen commented 7 years ago

@Kikobeats Could you update the docsify code on your end and check if problems still persist? You don't need the extra sw js file anymore. Compare the ./docs folder and the contained ./docs/index.html file here.

trusktr commented 4 years ago

This would be good to make configurable as an option that can be passed to the service worker perhaps. We should make a service worker file be consumable instead of it being embedded in the docs.