Description
For example, add a new queryForAllRequests
option that is used for all requests. This specifies a query string to use in every request, and when someone updates their site, they can update this string, which will force a browser to treat all requests as new files from network instead of from cache.
window.$docsify = {
queryForAllRequests: 'id=123'
}
where any time we update our website, we can change this value, which will force the browser to see all files as new files (uncached). We could then set the cache lifetime to larger number, and use only this approach to bust the browser cache. For example, the browser would request https://example.com/path/to/file.md?id=123
instead of just https://example.com/path/to/file.md
. When we update our site, we can change the option to 'id=124'
for example, and then the browser will fetch https://example.com/path/to/file.md?id=124
which it will see as a new file and will fetch it from network instead of from local cache.