Posts Tagged ‘ie flash caching’
Fix Flash SWF Caching
Anyone who has worked with a client knows that when the project launches, the work is never over. Often after launch you are prompted with a list of changes the client requests. In another case, you may have missed a large bug that hinders the user’s experience. In either case, you are left with a common problem when you are ready to push your new changes live: Flash Caching. By default a user’s browser will cache your swf files, rendering the user unable to see the new changes you just pushed. It is almost always a guarantee that that “user” is in fact your client on the other end of the phone telling you in a heated tone “NO, I still do not see the changes”. I have found the common tactic of tacking on random URL parameters to the swf’s location doesn’t always work for those in IE. It seems the browser often ignores the extra parameters when decided to load the new swf file or pull it from cache.
To fix this problem once and for all, I have been using a similar method. Instead of tacking on parameters to the URL, I include version numbers in the actual file name. This will ensure the browser will reload the new file. I embed my “shell_v1.swf” in the HTML and pass it a variable called “app_location” with a value of “myApp_v1.swf”. “app_location” is the URL path to to my actual app swf. The shell then loads the app and displays it. The app swf should also be labeled by version to ensure it will be reloaded with new versions. This should be easy for users programming in AS3, since you will most likely have your preloader in a separate swf.
