Skip to main content

Running SWF Files

· One min read

I was recently posed with a question on how to run Adobe Flash files in the browser. As far as I know, you can write a simple HTML page to embed the Flash file (SWF) in a page and load in the browser ( I also recall that any decent browser would be able to load the SWF file as-is without having to do anything extra.

However, loading the SWF file in Chrome on Linux does not work; loading the file causes Chrome to prompt the user to download it - definitely not the reaction I was hoping from the browser. Trying to solve this problem lead to learn a new thing about MIME types in Linux.

From, I learnt that file associations are placed in the file


and that the default MIME type for swf is

<mime-type type="application/">

To make the SWF file play in the browser, change the MIME type to

<mime-type type="application/x-shockwave-flash">

and then update the association by running

update-mime-database /usr/share/mime