Settings

Theme

Shift+Cmd+R and Cmd+R always returning different results? (Chrome and Firefox)

1 points by jasalo 7 years ago · 1 comment · 1 min read


This is the weirdest error I've had regarding cache. On browsers in which I've previously visited the website, there's some sort of "forced" cache that, no matter how many times I do Cmd+R, it still loads a cached version of an index.html file.

Also, if I do Shift+Cmd+R it correctly loads the new version (on Firefox), but if I do Cmd+R again, it loads the old cached file again!

Weirdest thing is that in Chrome, Shift+Cmd+R ONLY works if the dev console is open. Any ideas as to what can be happening here?

I'm sending a `Cache-Control: no-cache` header which only shows up on the "Shift+Cmd+R" cases. Shouldn't the file be re-cached once Shift+Cmd+R has "correctly" worked (i.e. loaded the new file)?

sbjs 7 years ago

I don't understand cache fully, but I do know that if you open Dev Tools in Chrome and long-press the Refresh button, it will give you a drop down with the option "Empty Cache and Hard Reload", and also shows you that Shift+Cmd+R is just Hard Reload without emptying the cache. Sometimes I need to do this, but I don't fully know why or when.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection