Prevent swf caching in browser

There are many ways to protect your swf file from being stolen, right from encrypting it with obfuscatory or making them domain dependent with this.url  property. However these is also a more dedicated and determined way to prevent swf theft in general. This has benefits as well as cons.

You can try to discourage swf theft by preventing swfs from appearing in browser cache. This can be done with the Apache .htaccess file. Simple add following lines to your site’s .htaccess file, that lies at the root of your site.

ExpiresActive Off
Header unset Cache-Control:
Header append Cache-Control: "no-cache, must-revalidate"
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"

October 8, 2009  Tags: ,   Posted in: General

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word