0

I currently have a caching problem on my flash site.

I have set the htaccess file to:

Header set Cache-Control "no-cache"

But when I refresh the page, the images on the flash site still shows the old one from the cache.

I also tried setting max age to 1, and to must-revalidate, but it doesn't work too.

I have also tried adding that line of code to my php index file, but it doesn't work either.

Could this be a fault with flash? I tried shift+refresh in Firefox, but the files are still cached, as shown in firebug. Is there a way to fix this?

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by twiss
1

You'll need to change the header of the flash file, something like this should work:

<FilesMatch "\.swf$">
Header set Cache-Control "no-cache, max-age=0, must-revalidate"
</FilesMatch>
0

Well, browsers can choose themselves what to do. As flash files are often big and don't change often, they might use their cache anyway. But why is this important? If, for example, the data you want to use in a flash thing changes often, you'll need to put that data in a seperate file (xml or csv or whatever) and have flash use that, rather than putting it inside the flash file.

0

That is what I did, all the data is in an xml file. The flash file simply holds the site design.

I have new images that simply don't update.

Could it be my host though?

0

Well, the thing is, that the browser when it got the file in the first place, decided not to get it another time soon, based on the headers it had. You can test in another browser that doesn't have it cached (or just clear the cache, whatever) to open the page, change the flash file, and reload, to see if your new headers do their job.
Also, in Firebug or the Chrome Developer Tools, you can see if the browser has downloaded the file, also check if it does if it hasn't changed. It shouldn't.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.