I am trying to force the loading of a web page to come from the server every time, as a hard refresh, with no cache.
Can I do this in HTML (header and/or body?) or must I use Java script?
Any guidance I can get on this will be greatly appreciated - I am basically not a coder so please do the "advice for dummies" answer!
Can this be inserted as part of the code in the menu/text link that calls that page, so it forces a refresh for every visitor who clicks on that link?
Thank you
Nick
Inserting cache-control: no-store...
I think you may get some updated help at w3schools.com .
I haven't needed it for some years, and last time I did, I popped this into a .htaccess file:
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
I haven't needed it for some years, and last time I did, I popped this into a .htaccess file:
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Hi Inger
Thank you very much.
Regards
Nick
Thank you very much.
Regards
Nick
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.