question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFC: Don't expose file last modifed date/time via cachebusted URLs

See original GitHub issue

Description 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:closed
  • Created 4 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mitchelsellerscommented, Jun 21, 2019

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.

0reactions
roman-yagodincommented, Jan 27, 2020

It would be me. Please don’t close.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found