This article explains how to prevent the browser from using cache memory when loading Flash files (.swf) or other static resources, so that the updated version from the server is always displayed.
Note: Adobe Flash is discontinued. If your site still references .swf files, it is advisable to migrate them to HTML5/video. The methods in this guide also apply to CSS, JS, and images.
Issue
By default, .swf files are downloaded only once and then the browser loads them from the local cache. Even if you update the file on the server, visitors may continue to see the old version.
Solution 1 — Expires Header (date in the past)
The Expires header tells the browser how long a file is valid. If you use a past date, the browser requests it from the server again.
In HTML (meta, for resources linked on the page):
<meta http-equiv="Expires" content="0" />
In .htaccess (for .swf files on the server):
<FilesMatch "\.(swf)$"> Header set Expires "Thu, 01 Jan 1970 00:00:00 GMT" </FilesMatch>
Requires the mod_headers module enabled in Apache.
Solution 2 — URL Parameter (cache busting)
You can force the download by adding a ? sign and a value to the end of the file URL. The browser treats it as a different resource.
Example in HTML — link to another page:
<a href="linked-page.html?nocache=1">Go to page</a>
Example — embedded Flash file:
<object data="animation.swf?v=2" type="application/x-shockwave-flash"> ... </object>
Every time you update the file, change the number (?v=3, ?v=4, etc.) or use a date: animation.swf?20250621.
Quick solution to test
In your browser, reload without cache using Ctrl + F5 (or incognito window) to verify that the new file is served correctly from the server.
Do you need help?
If you updated the file and visitors still see the previous version, contact technical support from the client portal or the online chat on the site.
