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

前端 未结 3 1598
猫巷女王i
猫巷女王i 2021-02-04 14:07

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

相关标签:
3条回答
  • 2021-02-04 14:15

    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() ?>"  
    
    0 讨论(0)
  • 2021-02-04 14:16

    change the source name by tagging.

    src="/flex/Prototype.swf?ver=1.0.1"
    
    0 讨论(0)
  • 2021-02-04 14:16

    Just append a number within the query string (you might think of it as version number of sorts). Then change that number whenever you change your SWF. When the number changes, the browser will see it as a different URL, so it'll skip the cache and go back to the server for a fresh copy of the swf.

    <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?1234" > 
    
    0 讨论(0)
提交回复
热议问题