News for hackers. Stuff that matters.
Re:Reload, reloaded: faster and leaner page reloads by burnbabyburn on Thursday January 26, 2017 @11:39AM (#13492802)
does this have any impact on who does webdev and often substitutes resources reusing the same url or similar things?
Re:Reload, reloaded: faster and leaner page reloads by Nadya on Thursday January 26, 2017 @12:01PM (#13493038)
Lots more Ctrl+F5 to refresh instead of just pressing F5.

It's actually been super annoying to explain to Project Managers - as they often don't see CSS changes due to this change (which actually happened nearly over a month ago).

Re:Reload, reloaded: faster and leaner page reloads by chias on Thursday January 26, 2017 @12:30PM (#13493304)
My preferred solution to this is to generate links to resources like that (CSS, JS, etc) dynamically.

For each filetype, set up your webserver such that `filename.[10-digits].css` is handled identically to `filename.css`. In apache, you can do this in .htaccess with a rule that looks something like:

    RewriteRule ^(.*)\.[\d]{10}\.(css|js|png)$ $1.$2 [L]
Then generate your links by throwing the file's last modified timestamp into the URL. The net result is that if the file changes, the URL changes, and so the cache no longer applies. It's better than using a "fake" parameter (e.g. file.js?v=2) because using fake parameters suggests that the file is dynamic, causing browsers and proxies to behave differently.
Re:Reload, reloaded: faster and leaner page reloads by tokenizerrr on Thursday January 26, 2017 @12:22PM (#13493227)
Ctrl+Shift+R is a bit more ergonomic.

> It's actually been super annoying to explain to Project Managers - as they often don't see CSS changes due to this change (which actually happened nearly over a month ago).

You are appending a cachebuster to the URL that changes for every release, right?

Re:Reload, reloaded: faster and leaner page reloads by Nadya on Thursday January 26, 2017 @12:39PM (#13493367)
>You are appending a cachebuster to the URL that changes for every release, right?

I'm in a department with a many years outdated CMS. The modern CMS does this after minification. The version I'm stuck with doesn't do cache busting or minification. My department is stuck on the outdated CMS due to our necessary continued support of IE8. So unfortunately no, we're not. We do so manually once a site is in production but it isn't worth the effort to do manually while things are still fast moving and internal. It's much easier to occasionally remind the project manager that they need to do a hard refresh.

Re:Reload, reloaded: faster and leaner page reloads by tokenizerrr on Thursday January 26, 2017 @12:46PM (#13493440)
That sucks. If I was in your situation I'd look into having the webservers rewrite caching headers to just disable caching completely in the internal environment.
Re:Reload, reloaded: faster and leaner page reloads by burnbabyburn on Friday January 27, 2017 @02:39AM (#13498341)
exactly this, there are people that need to access testing and could have this sort of problems.
Re:Reload, reloaded: faster and leaner page reloads by tyingq on Thursday January 26, 2017 @11:43AM (#13492837)
Sounds like it will, yes. You would have to open developer tools and "disable cache" on the network tab instead.
Re:Reload, reloaded: faster and leaner page reloads by sp332 on Thursday January 26, 2017 @01:49PM (#13494082)
If you have your cache control set correctly (short) for the resource, then the browser will still update it frequently.