RFC: Don't expose file last modifed date/time via cachebusted URLs
See original GitHub issueDescription of problem
Currently raw file last modifed date/time is used to produce cachebusted file URLs, like http://mysite.com/myfile.pdf?ver=2018-04-20-144725-343
. I thinks there are cases then we do not want the information about file modification date/time to be exposed in public. Just a sample case - the site owner delayed publishing some important document, but still want it to look just like it is published in time.
Description of solution
Just use some hash string instead of raw file last modifed date/time, something like this: http://mysite.com/myfile.pdf?ver=MjAxOC0wNC0yMC0x
.
Affected version
- 9.3.2
- 9.3.1
- 9.2.2
- 9.2.1
- 9.2
- 9.1.1
- 9.1
- 9.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
javascript - Cache busting via params
No. The parameter will not change the caching policy; the caching headers sent by the server still apply, and if it doesn't send...
Read more >Is max age relative to last-modified date or request time?
The max-age directive on a response implies that the response is cacheable (i.e., "public") unless some other, more restrictive cache directive ...
Read more >Changelog unsupported - Nextcloud
Don't use quota cache through user management (server#35313) · Fix mentions rendering in comment editor (server#35321) · Check quota on file copy (server#35328) ......
Read more >Changelog | Cypress Documentation
Fixed an issue where having cypress.config in a nested directory would cause problems with locating the component-index.html file when using component ...
Read more >Cache-Buster
This works because browsers will re-download "file.js" if the query parameter has changed since the last time they downloaded the file. Plan A:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Given that this is a process to bust cache only, and not anything used for calculation we just need to be assured that it is different for all edits.
I’m a big fan of option 2 above, as that is the shortest URL and a simple change.
Feel free to submit a Pull Request for this.
It would be me. Please don’t close.