Compare Revisions
Manage file types and download actions in Firefox
Revision 239102:
Revision 239102 by AliceWyman on
Revision 239112:
Revision 239112 by AliceWyman on
Keywords:
Search results summary:
How Firefox handles different content types, such as saving a file or opening it with an application, and how to change the download action.
How Firefox handles different content types, such as saving a file or opening it with an application, and how to change the download action.
Content:
This article describes how Firefox handles downloads for different types of content, such as saving a file or opening an application installed on your computer, and how you can change that behavior.
*For help with download problems, see [[What to do if you can't download or save files]].
*For help with embedded media on web pages, see [[Fix common audio and video issues]].
*For help changing the e-mail program that Firefox uses, see [[Change the program used to open email links]].
__TOC__
= File types and download actions =
When you click a download link to a file that Firefox cannot handle internally, {for not fx98}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. The{/for}{for fx98}the{/for} [https://wikipedia.org/wiki/Media_type Media type], also called the MIME type or [https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type Content type], as configured by the web server, will determine what action Firefox will take.
{note}'''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 [https://developer.mozilla.org/docs/Learn/Server-side/Configuring_server_MIME_types Properly configuring server MIME types] and [https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types Common MIME types] at MDN web docs.) You can contact the website in such cases or you can try a Firefox add-on such as [https://addons.mozilla.org/firefox/addon/content-type-fixer 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.)<!--https://support.mozilla.org/en-US/questions/1302591-->{/note}
{for not fx98}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,{/for}{for fx98}If Firefox does not have a download action set for a file that can be opened with an installed application and you select {menu Always Open Similar Files} in the Downloads panel right-click context menu for the downloaded item,{/for} ([[#w_adding-download-actions|see below]]) a new Content Type and Action entry will be added to the {menu 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.
# [[T:optionspreferences]]
# In the {menu General} panel, go to the ''Applications'' section.
# Select the ''Content Type'' entry for action you want to change. (You might see more than one entry for the same [http://wikipedia.org/wiki/File_format file format or extension] because some types of files include multiple content types.)
# The Action column will give you a drop-down menu, with options on the action to take, whenever you click that type of file.
#;{for mac}[[Image:Fx77Applications-PDF-Mac]]{/for}{for linux}[[Image:Fx78Applications-PDF]]{/for}{for win}[[Image:Fx78Applications-PDF-Win]]{/for}<!-- need linux image showing drop-down options -->
#* '''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).<!-- "Open in Firefox" since fx77 - see https://bugzilla.mozilla.org/show_bug.cgi?id=1581383-->
#* '''Always ask''': This will show you a prompt asking ''What should Firefox do with this file?'' ([[#w_what-should-firefox-do-with-this-file-prompt|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 [[Find and manage downloaded files|Downloads panel]], whenever you click that type of file.
#* '''Use … ''': Open the file with an application of your choosing.
# [[Template:closeoptionspreferences]]
= Adding download actions =
{for fx98}
Starting in [[Find what version of Firefox you are using|Firefox version]] 98, 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 {menu Always Open Similar Files} from the context menu.
[[Image:Fx97Downloads-FileContextmenu]]
Selecting {menu Always Open Similar Files} will add a new download action entry for that type of file to the {menu General} panel ''Applications'' section of Firefox settings. You can later [[#w_changing-download-actions|change the download action (see above)]] to a different action, such as "Always ask" or "Save File", if you wish.
{note}To learn more about the changes made to download actions in Firefox version 98, see [[Manage Downloads preferences using the Downloads menu panel]].{/note}
{/for}
{for not fx98}
<!-- http://kb.mozillazine.org/File_types_and_download_actions#Opening_dialog and https://bugzilla.mozilla.org/show_bug.cgi?id=218257 -->
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:
{/for}
{for fx98}If you change the action for a file type to ''Always ask'' in the {menu General} panel ''Applications'' section of Firefox settings, you will see a ''What should Firefox do with this file?'' prompt for that type of file:{/for}
== "What should Firefox do with this file?" prompt ==
{for win, linux}[[Image:Fx78OpeningFLVfile]]{/for}{for mac}[[Image:Fx90OpeningFLVfile-mac]]{/for}
{for not fx98}{note}'''Note:''' You will also see this prompt for download actions set to ''Always ask'' in Firefox settings.{/note}{/for}
* '''Open with''': {for not fx98}Saves the file to a temporary folder and opens it{/for}{for fx98}Opens the file{/for} 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 {for win, linux}[[T:optionsorpreferences]]{/for}{for mac}Preferences{/for} in the {menu 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 {button OK}.{for not fx98} This will add a new entry to the Content Type list of download actions.{/for}
{for not fx98}{note}'''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.{for not fx98} It also can happen if the server assigns "Content-Disposition: attachment" to the file. <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=453455 -->{/note}{/for}
{for not fx98}
=="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 {for mac} {button Choose…}{/for}{for win,linux}{button Browse…}{/for} button to choose an application installed on your computer to open the file.<br>{for win, linux}[[Image:Fx78OpeningPPTfile]]{/for}{for mac}[[Image:Fx90OpeningFileChoose-mac]]{/for}
{warning}'''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|Firefox repeatedly opens empty tabs or windows after you click on a link]].{/warning}
{/for}
= 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.
{note}This will remove all customized content type actions. You will have to make those changes over again after you take the following steps.{/note}
# [[T:profileFolder]]
# Close Firefox. [[T:closeFirefox]]
# Delete (or rename) the {filepath handlers.json} file.
# Restart Firefox.
This article describes how Firefox handles downloads for different types of content, such as saving a file or opening an application installed on your computer, and how you can change that behavior.
*For help with download problems, see [[What to do if you can't download or save files]].
*For help with embedded media on web pages, see [[Fix common audio and video issues]].
*For help changing the e-mail program that Firefox uses, see [[Change the program used to open email links]].
__TOC__
= File types and download actions =
When you click a download link to a file that Firefox cannot handle internally, {for not fx98}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. The{/for}{for fx98}the{/for} [https://wikipedia.org/wiki/Media_type Media type], also called the MIME type or [https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type Content type], as configured by the web server, will determine what action Firefox will take.
{note}'''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 [https://developer.mozilla.org/docs/Learn/Server-side/Configuring_server_MIME_types Properly configuring server MIME types] and [https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types Common MIME types] at MDN web docs.) You can contact the website in such cases or you can try a Firefox add-on such as [https://addons.mozilla.org/firefox/addon/content-type-fixer 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.)<!--https://support.mozilla.org/en-US/questions/1302591-->{/note}
{for not fx98}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,{/for}{for fx98}If Firefox does not have a download action set for a file that can be opened with an installed application and you select {menu Always Open Similar Files} in the Downloads panel right-click context menu for the downloaded item,{/for} ([[#w_adding-download-actions|see below]]) a new Content Type and Action entry will be added to the {menu 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.
# [[T:optionspreferences]]
# In the {menu General} panel, go to the ''Applications'' section.
# Select the ''Content Type'' entry for action you want to change. (You might see more than one entry for the same [http://wikipedia.org/wiki/File_format file format or extension] because some types of files include multiple content types.)
# The Action column will give you a drop-down menu, with options on the action to take.
#;{for mac}[[Image:Fx77Applications-PDF-Mac]]{/for}{for linux}[[Image:Fx78Applications-PDF]]{/for}{for win}[[Image:Fx91Applications-PDF-Win]]{/for}<!-- need linux image showing drop-down options -->
#* '''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 PDF, {for fx93}AVIF, {/for}XML, SVG, and WebP Image.
#* '''Always ask''': This will show you a prompt asking ''What should Firefox do with this file?'' ([[#w_what-should-firefox-do-with-this-file-prompt|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 [[Find and manage downloaded files|Downloads panel]], whenever you click that type of file.
#* '''Use … ''': Open the file with an application of your choosing.
# [[Template:closeoptionspreferences]]
= Adding download actions =
{for fx98}
Starting in [[Find what version of Firefox you are using|Firefox version]] 98, 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 {menu Always Open Similar Files} from the context menu.
[[Image:Fx97Downloads-FileContextmenu]]
Selecting {menu Always Open Similar Files} will add a new download action entry for that type of file to the {menu General} panel ''Applications'' section of Firefox settings. You can later [[#w_changing-download-actions|change the download action (see above)]] to a different action, such as "Always ask" or "Save File", if you wish.
{note}To learn more about the changes made to download actions in Firefox version 98, see [[Manage Downloads preferences using the Downloads menu panel]].{/note}
{/for}
{for not fx98}
<!-- http://kb.mozillazine.org/File_types_and_download_actions#Opening_dialog and https://bugzilla.mozilla.org/show_bug.cgi?id=218257 -->
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:
{/for}
{for fx98}If you change the action for a file type to ''Always ask'' in the {menu General} panel ''Applications'' section of Firefox settings, you will see a ''What should Firefox do with this file?'' prompt for that type of file:{/for}
== "What should Firefox do with this file?" prompt ==
{for win, linux}[[Image:Fx78OpeningFLVfile]]{/for}{for mac}[[Image:Fx90OpeningFLVfile-mac]]{/for}
{for not fx98}{note}'''Note:''' You will also see this prompt for download actions set to ''Always ask'' in Firefox settings.{/note}{/for}
* '''Open with''': {for not fx98}Saves the file to a temporary folder and opens it{/for}{for fx98}Opens the file{/for} 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 {for win, linux}[[T:optionsorpreferences]]{/for}{for mac}Preferences{/for} in the {menu 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 {button OK}.{for not fx98} This will add a new entry to the Content Type list of download actions.{/for}
{for not fx98}{note}'''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.{for not fx98} It also can happen if the server assigns "Content-Disposition: attachment" to the file. <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=453455 -->{/note}{/for}
{for not fx98}
=="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 {for mac} {button Choose…}{/for}{for win,linux}{button Browse…}{/for} button to choose an application installed on your computer to open the file.<br>{for win, linux}[[Image:Fx78OpeningPPTfile]]{/for}{for mac}[[Image:Fx90OpeningFileChoose-mac]]{/for}
{warning}'''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|Firefox repeatedly opens empty tabs or windows after you click on a link]].{/warning}
{/for}
= 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.
{note}This will remove all customized content type actions. You will have to make those changes over again after you take the following steps.{/note}
# [[T:profileFolder]]
# Close Firefox. [[T:closeFirefox]]
# Delete (or rename) the {filepath handlers.json} file.
# Restart Firefox.