Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Natao arisiva ity resaka mitohy ity. Mametraha fanontaniana azafady raha mila fanampiana.

Changing the way browser handles txt files to directly download instead of previewing in browser

  • 3 valiny
  • 13 manana an'ity olana ity
  • 1 view
  • Valiny farany nomen'i cor-el

more options

When I click on a URL that leads to a txt file, it is being previewed in the browser directly. I would like to change this so that it is downloaded automatically.

I checked how the application handles "Text Document" objects and it is set to "Save File", however the txt file is still being displayed directly.

The MIME Type is "text/plain", and seems to match the settings shown in mimetypes.rdf What do I do to make it so that txt files are downloaded automatically? Is there some setting similar to pdfjs that is overwriting my own content settings?

I am using firefox 22

When I click on a URL that leads to a txt file, it is being previewed in the browser directly. I would like to change this so that it is downloaded automatically. I checked how the application handles "Text Document" objects and it is set to "Save File", however the txt file is still being displayed directly. The MIME Type is "text/plain", and seems to match the settings shown in mimetypes.rdf What do I do to make it so that txt files are downloaded automatically? Is there some setting similar to pdfjs that is overwriting my own content settings? I am using firefox 22

Novain'i MxyL t@

All Replies (3)

more options

Right-click the hyperlink and use Save Link As....

more options

That would allow me to save the text file to a folder but I don't want to do this everytime I click on a txt file link. I figured the content application settings are supposed to be used for things like this.

Novain'i MxyL t@

more options

Files that are send by the server as text/plain as is usually the case with text files are always opened in a browser tab if you left click such a link.
There is nothing that you can do to change this and you will have to force a download via "Save Link as".

Alternatively you can toggle the browser.altClickSave pref to true on the about:config page.
Then you can hold down the Alt key and left-click to download and save the file.