How to clear temp client browser files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
panprasath
Forum Newbie
Posts: 19
Joined: Thu Jul 24, 2008 3:35 am
Location: Chennai,Tamilnadu,India

How to clear temp client browser files

Post by panprasath »

My page display flash images…..in each time it will call same xml file(for flash) with different images…..but in Ie6 the past xml is stored in the client side…so that new images are not displayed…..so how to clear this fie in client side…..


I also try the following script but not work





header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Pragma: public");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");




Please help me
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Re: How to clear temp client browser files

Post by Jenk »

You can't. You've already got the most reliable, but none are guaranteed.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: How to clear temp client browser files

Post by Eran »

Simply add a random string as a get parameter for the file. If the string is different each time, the file will be reloaded each time. Something like:

Code: Select all

 
images.xml?r=<?php echo mt_rand(); ?>
 
If you are loading the xml directly from the flash and not via a parameter, use Math.random to achieve the same effect.
panprasath
Forum Newbie
Posts: 19
Joined: Thu Jul 24, 2008 3:35 am
Location: Chennai,Tamilnadu,India

Re: How to clear temp client browser files

Post by panprasath »

please give any example files for flash.......
Post Reply