Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I force the web browser to reload a newly deployed Flash file without clearing the cache?

When I deploy a new .swf file in an HTML file as shown below, I have to clear the browser cache before the new .swf file loads in the browser. Is there anyway to force the browser to load the .swf file when I replace it with a new one on the server.

<embed type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.adobe.com/go/getflashplayer" allowscriptaccess="sameDomain" name="Prototype" bgcolor="#869ca7" quality="high" id="Prototype" src="/flex/Prototype.swf"> 

Thanks, Chirag

like image 801
Chirag Patel Avatar asked Sep 16 '10 04:09

Chirag Patel


2 Answers

change the source name by tagging.

src="/flex/Prototype.swf?ver=1.0.1"
like image 68
gianebao Avatar answered Oct 22 '22 21:10

gianebao


I do the same but add a random number so I don't have to write a new number every time

src="/flex/Prototype.swf?<?= rand() ?>"  
like image 42
PatrickS Avatar answered Oct 22 '22 22:10

PatrickS