PDA

View Full Version : Clearing Cache


squirellplaying
07-26-2004, 12:27 AM
I just finish updating the website I am hosting and found that every time I update it I need to do the shift+refresh so I'm not viewing the site from cache. Now this will be a problem for people going to it for the second time and seeing the nonupdated site! So is there a script I can put to clean the cache for just my site, or am I stuck spreading the word about shift+refresh?

bpaulsen2000
07-26-2004, 03:25 AM
Hi,

Don't know of any way to clear a user's cache. Tend to think it would be
a huge security violation. Unless you issue a message inxtructing them
how to set the refresh rate within their browser, you're stucked.

squirellplaying
07-26-2004, 03:33 AM
I figured it would be a security problem. Hmmm. I can just spread the word I guess.

Big Fat
07-26-2004, 05:23 AM
I've tried using a meta tag to prevent that, but search engines pretty much igor it. A script would have to be executable, so it would hurt your site even if there were such a script for obvious reason.

neofibril
07-26-2004, 10:21 PM
Have you tried this combo? (http://tech.irt.org/articles/js187/)
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

or from a script: location.reload(true)

Nightfire
07-27-2004, 12:54 AM
I figured it would be a security problem. Hmmm. I can just spread the word I guess.
The day it becomes a security problem is when you don't expect a 'hole' in that area - which means bad practise of coding.
You can try to make the site load every time by changing the headers to expire within a past date, although I highly doubt it's worth the effort, unless the site changes every 20 mins or so