Forum Moderators: open

Message Too Old, No Replies

clearing the cache fully

         

chaza

7:44 pm on Feb 6, 2004 (gmt 0)

10+ Year Member



I have a flash file that uses external jpgs and text files.
When I clear the cache it only seems to clear the image files and not the .txt files.

Is there a way to stop the txt files from caching but not the image files. In fact just stoping all files from being cached will be a good start.

I have tried:
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
without success.

Php is an option on my server if there is a way it can do it.

DrDoc

6:02 pm on Feb 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

There's an old thread somewhere about what Brett does here at Webmaster World to prevent caching. But I can't seem to find the link. Anyone else?

keyplyr

5:40 am on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, Welcome to Webmaster World Chaza.

To combine several header methods, call this cache-buster.php:

<?

header("Cache-Control: no-cache, must-revalidate");

header("Pragma: no-cache");

header("Expires: Mon,26 Jul 1997 05:00:00 GMT");

?>

<added>

One way to call it is to use:

<?
php include("cache-buster.php");
?>

chaza

2:59 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



I have solved the problem by giving the txt file a random variable when called.

"file.txt?ran=<?php echo rand(1000,10000);?>"