PDA

View Full Version : IE Specific Caching


Grisha
08-05-2005, 06:47 PM
Hello all,

I am aware that this question has been discussed everywhere but I need a final answer.

I have a flash movie that loads its contents from a txt file (yes txt file not xml).

I would like to be able to load the updated file everytime I hit refresh.
I tried adding a random number as a part of the file, I tried adding the pragma and the expires lines into the html file.

It (Edit:does not) works with Firefox and it refreshes everytime I close and reopen IE which is pretty good.

I also tried to read the file through PHP (which is a server page) while doing this I was very sure that it would update on refresh in IE but it does not.

I've used readfile() as the PHP reading function and maybe I should use something else or I am doing the procedure somehow wrong, I even added an expiery onto the PHP page the text fiel is read through.(still nothing)

So the question remains: Is it possible to make IE update on refresh?

Thank you,

sleekdigital
08-05-2005, 08:23 PM
In my experience the random number in the querystring of the request for the file works just fine. This works because browsers cache content based on the full URL including the querystring. I don't think IE and firefox differ in this regard. What exactly is the code you are using to implement this?

Grisha
08-06-2005, 10:56 PM
I am using this code in the php file.
echo readfile("file.txt");

while I am loading variable in from a file
loadvariables("database.php?nocache="+getTimer())

I update the file.txt and I thought I should expect to see the the updates done everytime I refresh the page and flash should re-request the database.php file.

sleekdigital
08-07-2005, 12:31 AM
hmm, maybe the file is getting cached somewhere else? You can prove to yourself that IE is getting a new file by looking in the cache directory.

C:\Documents and Settings\yourusername\Local Settings\Temporary Internet Files