Heloo all..
I need a great help.. My site uses flash and when i update the flash file and put it in the server and refresh again.. The same old flash file is being showed..[because the files are getting cached in the browsers history]
I have used many meta tags to avoid caching.. but it seems failing..
Anyone have idea to overcome this problem ?? Please help me guys...
No Cache Needed !!
Moderators: egami, macek, gesf
-
- New php-forum User
- Posts: 243
- Joined: Wed Feb 01, 2006 9:18 am
- Location: Netherlands
- Contact:
In these cases, I've always added a bogus parameter to the swf file, with a PHP random value:
src="myfile.swf?bogus=<?= mt_rand(1000, 9999) ?>"
That way it won't be cached. I know this sucks, but at least for development it helps.
Coditor
src="myfile.swf?bogus=<?= mt_rand(1000, 9999) ?>"
That way it won't be cached. I know this sucks, but at least for development it helps.
Coditor
Your other option is to do a forced refresh - when you see the page hold down ctrl + F5, or hold down ctrl while clicking on the refresh button - it will reload the entire web site, ignoring anything in the cache. This isnt exactly something you can expect the public to do so for a live site, Coditor's suggestion is good - but for changes to a site still in development this should help.
Power is the only pure motivator of humanity
hi coditor & revq,
Yeah u r right i too have used the rand?<php echo(... to load a new flash file..
but as revq said , ctrl+F5 thing.. but users dont do it normally..
tried many things in meta tag but it not helping guys ??
anyother help would be greatly appreciated !!!
Yeah u r right i too have used the rand?<php echo(... to load a new flash file..
but as revq said , ctrl+F5 thing.. but users dont do it normally..
tried many things in meta tag but it not helping guys ??
anyother help would be greatly appreciated !!!
If your server supports PHP then try this in beginning...
use below code to disable caching:
use below code to disable caching:
Code: Select all
<?php
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
?>
thanks sanket ...
i havent tried this.. will this work for all browsers ??
i havent tried this.. will this work for all browsers ??
yeah thats the thing..
the flash player is the problem ..
the flash player is the problem ..