Flash - how to prevent cache memory usage for .swf files

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.

  • flash como prevenir consumo, flash error de memoria, como prevenir uso memoria cache flash, archivos swf
  • 13 Users Found This Useful
Was this answer helpful?

Related Articles

I purchased the service but my domain does not work

This article explains the most frequent causes why a domain does not work and how to check them....

Out of space, how to fix it

This article explains what to do if you run out of space on your contracted Web Hosting service....

Bandwidth limit exceeded, my website is not working

This article explains what the Bandwidth limit exceeded message means and what options you have...

Traceroute and obtaining IP address

This article explains how to perform a traceroute (tracert) and how to obtain the public IP of...

Common issues related to FTP connections

This article describes solutions to frequent problems in FTP connections. The examples use the...