Manage file types and download actions in Firefox

Revision Information
  • Revision id: 207398
  • Created:
  • Creator: PGGWriter
  • Comment: Added Misconfigured Web Servers section. Unnecessary?
  • Reviewed: Yes
  • Reviewed:
  • Reviewed by: AliceWyman
  • Is approved? No
  • Is current revision? No
  • Ready for localization: No
Revision Source
Revision Content

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

Download actions

When you click a link to download a file, you may see a dialog asking whether you want to save the file or open it with a specific application, if Firefox cannot handle the file internally. The 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 download 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 or asking you what to do. (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 extension such as Content-Type Fixer to work around the problem.

When you tell Firefox to open or save the file and also check the option to "Do this automatically for files like this from now on" (see below), a new Content Type and Action entry for that type of file will appear in the Applications section of the General panel in 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 then select Preferences or Settings, depending on your macOS version.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.
    Multiple entries for the same file format or extension? Some file types can include more than one Internet Media type.
  4. The Action column will give you a drop-down menu, with options on action to take, whenever you click that type of file.
    Fx76Applications-PDF-Macapplications-fx57-pdfFx61Applications-pdf-win7Fx77Applications-PDF-MacFx78Applications-PDFFx78Applications-PDF-Win
    • Preview in FirefoxOpen 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 prompt you to select what action you want Firefox to take when you click on that type of file. 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 window, whenever you click that type of file.
    • Use ... : Open the file with an application of your choosing.
  5. The template "closeoptionspreferences" does not exist or has no approved revision.

Adding download actions

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

Fx4WinOpeningFileMacOpeningFile
  • Open with: Saves the file to a temporary folder and opens it in the default application for that file type. To select an application, click Choose...Browse....
Warning: Do not choose Firefox to always open a certain file type, as doing so can cause a problem where Firefox repeatedly opens empty tabs or windows after you click on a link.
  • Save file: Saves the file to the download folder (specified in the General panel of Firefox OptionsPreferences).
  • Do this automatically for files like this from now on: Check mark this setting and then click OK to add a new entry to the Content Type list for that file type.
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.

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 Fx89menuButton, click Help and select More Troubleshooting Information.From the Help menu, select More 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 Fx89menuButton and select Exit.Click the Firefox menu at the top of the screen and select Quit Firefox.Click the Firefox menu Fx89menuButton and select Quit.
  3. Delete (or rename) the handlers.json file.
  4. Restart Firefox.

Misconfigured Web Servers

If you click a link and Firefox acts incorrectly, then there could be a problem with the configuration of the web servers. A Misconfigured Web Server, in a broad sense, is a web server that has not set up and tightened its securities right (read more here). When related to downloads, it can mean the web server does not include the correct content-type (MIME Type) on the file, as Firefox browsers need the correct content-type to handle the file for security reasons (read more here).