I have a site the runs in flash. IE7 will not reload the vars in flash, the vars set by flash in the swf. when the page is reloaded. The thing that bugs me out is refreshing the page actually refreshed the page. The flash started how it was supposed to except the variables in flash didn't reset.
This only happens when the "Temporary Internet Files" settings in IE is set to "automatic". B开发者_运维百科ut works how it should when "Everytime I visit The Page" is checked.
What can possibly cause this?
Internet Explorer is probably caching the HTML and/or SWF file. You can by-pass the cache by reloading the browser holding the ctrl-key, but for a more general solution you need to tell the browser not to cache the files.
For HTML files (i.e. the file embedding your SWF) you can add the following meta code:
<meta http-equiv="cache-control" content="no-cache" />
For other files you need to do it on the server side by altering the HTTP headers. If your files are hosted on Apache server, then you can use .htaccess
files for this. You can also change the http header of PHP scripts.
possibly, flash plug in / browser relation ship and how it uses cache, check out this link to forum thread, hopefully it will help. http://www.ultrashock.com/forums/actionscript/force-reload-files-only-using-as3-123408.html
I don't know much about flash but this sort of thing happens when supplementary resources are fetched asynchronously.
When refreshing IE will ensure that not only the current document is refreshed but any resources (JS, BMP, SWF, etc) that are reference by elements created during the load period of the refreshed document.
However if additional activity is scheduled to run after the load (say via Javascript setTimeout) and these additional activities load further resources then those resource will not consider themselves to be under refersh context. Hence if they are cacheable and fresh in the cache they will be delivered without roundtripping the server.
Normally when "Automatic" is set IE will ignore any fresh cache content if the resource has never been fetched in the current session. By setting "Every time I visit the page" you extend this behaviour to every visit (including refreshes) instead per session.
精彩评论