View Full Version : Help about Cache clearing and Website updates?
oldspice
04-17-2002, 10:03 PM
It just occured to me that although I update my site frequently many customers who come to my site may never realize the updates for days because their browsers are set to cache web pages for days so they would in essence not see updates made for days. I heard that some companies actually pre-cache sites for days to cutdown on bandwidth use. I don't know if this is true but have heard of such a thing.
My main question:
Is there a way to force a users browser to update the site automatically everytime a user comes to it rather than simply show the results obtained previously in the day or maybe many days ago?
I also have the same problem. So far what I have is to put the no-cache code on the html/asp page that contains flash. It helps a little bit but users still have to clear their cache.
Let me search for that code. Couldn't remember off-hand. too many things today. :D
JHallam
04-17-2002, 11:59 PM
There is a way with external scritping, just forgot!
I will find a way cus I know there is light, I can see it :D
I know I can do it with php, quite easily like so
There is a function in PHP called - clearstatcache
That clears the file named.
Read up @ www.php.net etc and find out about cache related subjects then you will find a solution.
I think it can be done with JScript, I'm so sure it can be, give me some more time :D
for server side stuff, some folks do something like:
getURL("mySite.asp?"+Math.random()*getTimer());
this will provide a unique url every time so the browser goes to get the page, not the cached version of the page.
(my random code is just a spur of the moment hack... don't know if it will actually create a unique value every time - its just an example of what could be done).
Here is one way that I use with my asp page...
Response.Buffer = true
Response.Expires = -5000
Response.AddHeader "pragma", "noCache"
Response.CacheControl = "no-cache"
You can also search the forum using keyword like "cache problem"
:D
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.