File types and download actions

From MozillaZine Knowledge Base
Revision as of 18:02, 30 June 2008 by Alice Wyman (talk | contribs) (→‎File handling in Firefox 3 and SeaMonkey 2: removed Addons-PluginsSM2.png image which I added to the linked Issues related to plugins article)
Jump to navigationJump to search

This article describes how Firefox and Mozilla Suite/SeaMonkey handle downloads for different types of files and how you can change that behavior. If you need help with embedded media on a web page or a "missing plugin" alert, see Video or audio does not play. If you need help with Thunderbird mail attachments, see Actions for attachment file types.

Opening dialog

When you click a link to download a file, the MIME type determines what action is taken. If you see an "Opening <filename>" dialog asking if you want to save the file or open it with a specified application, that means that no plugin is installed and enabled that can handle that MIME type and you have not previously selected a download action or helper application to always use for that type of file.

If you check the option to "Always perform this action when handling files of this type" (SeaMonkey and Mozilla Suite) or "Do this automatically for files like this from now on" (Firefox), then an entry will appear for that type of file in the Download Actions or (Helper) Applications listing.

In certain situations, you may not be able to set an automatic download action because the choice to automatically perform the action for future downloads will either not be remembered or the option will be "grayed-out", as shown in this SeaMonkey example. This problem can occur when a misconfigured web server incorrectly sends the file with the MIME type "application/octet-stream" or "text/plain". It also can happen if the server assigns "Content-Disposition: attachment" to the download [1].

Resetting download actions

This applies to all versions of Firefox and Mozilla Suite/SeaMonkey

If problems arise or if you want to restore the default set of file download actions, do the following [2]:

  1. Type about:config into the address bar.
  2. Find the preference browser.download.pluginOverrideTypes and, if it is present, right-click on it and select reset.
  3. Find the preference plugin.disable_full_page_plugin_for_types and, if it is present, right-click on it and select reset.
  4. Exit the browser, then open the profile folder (the profile folder is hidden by default in Windows 2000/XP/Vista and Linux; read this if you need help finding it).
  5. Delete (or rename) the file mimeTypes.rdf. Caution: There is also a mimeTypes.rdf file in the program folder. Do not delete it by mistake.

Managing file types - Firefox 2

This will not affect media embedded in a web page - only links to the files themselves. Certain file extensions may include multiple entries, one for each MIME type associated with that type of file.

Changing download actions

Go to "Tools -> Options -> Content / File Types -> Manage...". The Download Actions window will open. (MIME types are not shown by default. Click the icon in the top right corner and select "MIME Type" to display them.)

Select a file type entry and click 'Change Action...'

  • If you want files of that type to open with the default application, select "Open them with the default application".
  • If you want a different application to handle that type, select "Open them with this application" and choose the application. Caution: Make sure that the application you choose can handle the file type. For example, to choose Windows Media Player, browse to the C:\Program Files\Windows Media Player folder in the "Select Helper Application" window and select "wmplayer.exe".
  • If you want the file to be saved instead of opened, select "Save them on my computer".
  • In some cases, the option "Use this Plugin" will be available. It is the default action if a plugin is found for the file type.

Adding a download action

MIME types that are not handled by plugins do not appear in the Download Actions listing unless you have previously encountered that type of file and checked the option in the "Opening" dialog box to "Do this automatically for files like this from now on", as described above. You cannot add new file types to the Download Actions listing in Firefox, as you can in Mozilla Suite/SeaMonkey 1.x. The MIME Edit extension provides the SeaMonkey 1.x "Helper Applications" interface, shown below, as a Firefox add-on.

Removing a download action

After a helper application or "save to disk" download action has been set, that action will be taken automatically for those types of files. To remove a download action, open the Download Actions dialog as described above, select the file type entry and click the "Remove action" button. The next time you encounter that type of file, an "Opening" dialog will appear, asking you to specify an application or save the file.

Removing a download action does not affect files that are handled by plugins. Firefox 2 will automatically use a plugin if it is available for the MIME type, as shown in the about:plugins list.

Managing file types - SeaMonkey 1.x

This applies to Mozilla Suite / SeaMonkey 1.x

Go to "Edit -> Preferences -> Navigator -> Helper Applications". The Helper Applications preferences panel will open. Mozilla Suite and SeaMonkey 1.x list file type entries by MIME type, not file extension.

Changing actions for file types

This will not affect media embedded in a web page - only links to the files themselves.

In the Helper Applications panel, the entries will be listed as MIME types. Select the entry for the file type you wish to change and click the 'Edit' button to change the action.

  • If you want files of that type to open with the default application, select "Open it using the default application"
  • If you want a different application to handle that type, select "Open it with" and use the "Choose..." button to locate the program executable.
  • If you want the file to be saved instead of opened, select "Save it to disk".

Note: Mozilla Suite and SeaMonkey 1.x do not list plugin actions in the Helper Applications listing. You cannot disable a plugin for file downloads here. You can check in "Help -> About Plug-ins" to see which MIME types are automatically handled by plugins.

Adding a file type

The Helper Applications preference panel (shown above) allows you to add new download actions for MIME types. Clicking the "New Type..." button opens a dialog where you can add the MIME type (e.g. application/msword) description (e.g. Word Document) and file extension (e.g. doc). You can set the new download action to either open with a specified helper application or save to disk.

The actions you add will not affect MIME types that are handled internally, which include certain MIME types such as image/jpeg or text/plain [3] and all MIME types that are handled by plugins [4]. Before adding a new action for such MIME types, a Warning dialog similar to the following will be displayed:

Removing a file type

After a helper application or "save to disk" action has been set, that action will be taken automatically for those types of files. To remove an action for a file type, open the Helper Applications preference panel as described above, select the file type entry and click the "Remove" button. The next time you encounter that type of file, an "Opening" dialog will appear, asking you to specify an application or save the file.

Removing a file type from the Helper Applications list does not affect files that are handled by plugins. Mozilla Suite/SeaMonkey 1.x will automatically use a plugin if it is available for the MIME type, as shown in the about:plugins list.

File handling in Firefox 3 and SeaMonkey 2

As in earlier versions, Firefox 3 and SeaMonkey 2 will use an installed and enabled plugin to open a downloaded file by default, based on its MIME type. (Starting in Firefox 3 and SeaMonkey 2, you are able to disable plugins within your browser, via "Tools -> Add-ons (Add-on Manager) -> Plugins". See Issues related to plugins for more information).

In Firefox 3 and in SeaMonkey 2, you can manage what actions are taken for file content types (MIME types) and some protocols via the new "Applications" user interface in Firefox 3 and in the redesigned "Helper Applications" panel in SeaMonkey 2, shown below.

Note: The new (Helper) Applications window does not include file extensions (such as .PDF) and MIME types are only included for content types with multiple entries. You will have to depend on the icon or the content description to determine the type of file. Plugins are identified with "(in Firefox)" or "(in SeaMonkey)" after the handler name. Additionally, you won't be able to add entries for new content types, as you were able to do in SeaMonkey 1.x.

Managing content types - Firefox 3

Go to "Tools -> Options -> Applications". The below example shows the Applications Options/Preferences window and the drop-down menu for the "Adobe Acrobat 7.0 Document" type, with "Use Adobe Acrobat (in Firefox)" selected and other options for handling PDF files.

Here, you can change the download action for any of the listed content types (Web Feeds and certain protocols, such as the "mailto" protocol for opening a mail client, will also be listed). The new interface will have a drop-down menu to change content handling for each listed type. You will be able to remove an automatic download action for file types currently handled by plugins by selecting "Always Ask".

Managing content types - SeaMonkey 2

Go to "Edit -> Preferences -> Browser -> Helper Applications". The new Helper Applications panel in SeaMonkey 2 will open. Here, you can change or remove download actions in the same way as explained above for Firefox 3.

See also

Related bug reports

Please do not comment in bug reports unless you are helping to fix the bug. Also note that some of the bugs listed below are fixed and others may be marked "invalid" or "wontfix"; these are included for informational purposes only.

External links