Change what Firefox does when you click on or download a file

This article will describe how Firefox handles downloads for different types of files and how you can change that behavior.

File types and download actions

When you click a download link to a file that Firefox cannot handle internally, you may see a dialog asking whether you want to save the file or open it with a specific application, if there is no download action already set for that file type. Thethe Media type, also called the MIME type or Content type, as configured by the web server, will determine what action Firefox will take.

Note: Firefox will not be able to properly handle a file if a misconfigured web server sends it with an incorrect content type. For example, Firefox may display the content as plain text instead of opening the file in an application. (To learn more, see Properly configuring server MIME types at MDN web docs.) You can contact the website in such cases or you can try a Firefox add-on such as Content-Type Fixer to work around the problem. (If you use an add-on and you need help with it, you should visit the add-on site or contact the add-on developer directly for support.)

When you tell Firefox to open or save a file and also check the option "Do this automatically for files like this from now on" in the "What should Firefox do with this file?" prompt,If Firefox does not have a download action set for a file that can be opened with an installed application and you select Always Open Similar Files in the Downloads panel right-click context menu for the downloaded item, (see below) a new Content Type and Action entry will be added to the General panel Applications section of Firefox settings.

Changing download actions

You can change what action Firefox takes for defined content types. This will not affect media embedded in a web page – only links to the files themselves.

  1. In the Menu bar at the top of the screen, click Firefox and select Preferences. Click the menu button Fx57Menu and select OptionsPreferences.Click the menu button Fx89menuButton and select Settings.

  2. In the General panel, go to the Applications section.
  3. Select the entry for the file type you want to change. (You might see more than one entry for the same file format or extension. This is because some file types can include multiple Internet Media types.)
  4. The Action column will give you a drop-down menu, with options on the action to take, whenever you click that type of file.
    • Open in Firefox: Select this if you want Firefox to display the content. It only applies to a limited number of file types that Firefox is able to decode, such as Portable Document Format (PDF).
    • Always ask: This will show you a prompt asking What should Firefox do with this file? (as shown below) so that you can select the action you want Firefox to take. This can be useful if Firefox is automatically saving a file type or is always opening it with a certain program, and you want to be asked what to do.
    • Save File: This will always save the file to your computer using the Downloads panel, whenever you click that type of file.
    • Use … : Open the file with an application of your choosing.
  5. Close the about:preferences page. Any changes you've made will automatically be saved.

Adding download actions

Starting in Firefox version 97, when you download a file that can be opened with an installed application, you can right-click the downloaded item in the Downloads panel and select Always Open Similar Files from the context menu.


Selecting Always Open Similar Files will add a new download action entry for that type of file to the General panel Applications section of Firefox settings. You can later change the download action (see above) to a different action, such as "Always ask" or "Save File", if you wish.

To learn more about the changes made to download actions in Firefox version 97, see Manage Downloads preferences using the Downloads menu panel.

When you click on a link and Firefox doesn't have a content type and download action set up for that type of file, Firefox will ask you how to handle the file by showing you the following prompt:

If you change the action for a file type to Always ask in the General panel Applications section of Firefox settings, you will see a What should Firefox do with this file? prompt for that type of file:

"What should Firefox do with this file?" prompt


Note: You will also see this prompt for download actions set to Always ask in Firefox settings.
  • Open with: Saves the file to a temporary folder and opens itOpens the file in the operating system's default application for that file type. (You can also use the drop-down menu to choose another application.)
  • Save File: Saves the file to the download folder (specified in your Firefox OptionsPreferencesSettings Preferences in the General panel under Downloads).
  • Do this automatically for files like this from now on: Check mark this setting to always take the selected action and then click OK. This will add a new entry to the Content Type list of download actions.
Is Do this automatically for files like this from now on disabled? This can happen if the website's server incorrectly specifies the Internet Media type of the file. It also can happen if the server assigns "Content-Disposition: attachment" to the file.

"What should Firefox do with this file?" prompt does not show an application

The "What should Firefox do with this file?" prompt may not show a default application for some file types. You can click the Choose…Browse… button to choose an application installed on your computer to open the file.

Warning: Do not choose Firefox as a helper application to always open the file type, as this can cause a problem where Firefox repeatedly opens empty tabs or windows after you click on a link.

Resetting download actions for all content types

If you are having problems with how Firefox is handling file downloads that you can't resolve, or if you just want to start fresh, you can restore the default content types and actions by manually deleting the file that stores these settings.

This will remove all customized content type actions. You will have to make those changes over again after you take the following steps.
  1. Open your profile folder:

    • Click the menu button Fx57menu, click Help, and select Troubleshooting InformationMore Troubleshooting Information.From the Help menu, select Troubleshooting InformationMore Troubleshooting Information. The Troubleshooting Information tab will open.
    • Under the Application Basics section next to Profile FolderDirectory, click Open FolderShow in FinderOpen Directory. A window will open that contains your profile folder.Your profile folder will open.
    Note: If you are unable to open or use Firefox, follow the instructions in Finding your profile without opening Firefox.

  2. Close Firefox. Click the Firefox menu Fx57Menu and select Exit.Click the Firefox menu at the top of the screen and select Quit Firefox.Click the Firefox menu Fx57Menu and select Quit.
  3. Delete (or rename) the handlers.json file.
  4. Restart Firefox.

Was this article helpful?

Please wait...

These fine people helped write this article:

Illustration of hands


Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More