I have a .swf in my rails application, located here:
/public/bin/editor/Ed开发者_开发知识库itor.swf
It works fine, with one flaw, it gets cached often, so when we release a new version we are usually needing to tell the customers to clear their cache when they experience issues. My question is, how could I force the .swf to break cache when I release a new version? Something like:
/public/bin/editor/Editor.swf?timestamp=124158512132
I tried the above, but it did not seem to work. Any ideas would be great!
if you are using swfobject.js and want the item not be cached you need to add this, to the swf description:
swfobject.embedSWF( 'index.swf ?'+ new Date().getTime()...
of course you can change getTime() to the format you like.
Consider employing a versioning nomenclature to your editor. For example Editor_v1.01.005.swf
Here's a good format
app_major_minor_patch.swf
There are a number of benefits for doing this, and it will also solve your caching issue as well out of coincidence. :)
精彩评论