3
By default Firefox opens pages with MIME
Content-Type: text/plain
in the browser. I would like to instead download these files. I realize I can
File Save Page As, but I would like the Save File
dialog to come up on these files.
3
By default Firefox opens pages with MIME
Content-Type: text/plain
in the browser. I would like to instead download these files. I realize I can
File Save Page As, but I would like the Save File
dialog to come up on these files.
1
At the top of the Firefox window, click on the Firefox button and then select Options Select the Applications panel.
The Applications panel will display. Select the type of file for which you want to change the default action.
Multiple entries for the same file extension? Some extensions are used by more than one Internet Media type.
The Action column will give you a drop-down menu, with options on action to take, whenever you click that type of file.
Always ask: 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: will always save the file to your computer using the Downloads window, whenever you click that type of file.
Open the file with an application or plugin of your choosing.
Click OK to close the Options window after making changes
OK, since the comments don't allow formatting that well let me edit here. If you don't see the TXT file type do the following:
In Firefox and Mozilla Suite/SeaMonkey, type about:config in the Location Bar (address bar) and press Enter to display the list of preferences, as shown below in Firefox 14 on Windows 7. If you see a page with the warning message, This might void your warranty!, click the button labeled "I'll be careful, I promise!", to continue.
To add a new preference, context-click (right-click) anywhere in the list of preferences. In the context menu, select New then select the type of preference you are adding.
String is any sequence of text
Integer is a number
Boolean is true-false
To modify an existing preference, context-click (right-click) on the preference, select Modify and type in the new value. In some cases, Toggle will be the selection offered for boolean (true-false) preferences.
If you set the Boolean pref browser.altClickSave to true on the about:config page then you can force a download if you hold down the Alt key and left-click the link.
The content type isn't listed under Applications. Is there a way to add something to that list, not requiring use of a modifier key for txt files (which may be mixed in with other file types in a list of downloads)? – WBT – 2017-10-09T14:12:17.800
Also, use of the Alt key instead of right-click Save Link As causes the default filename to match the link target (which might be a number or similar) plus a default .htm extension if there isn't any on the end of the URI, rather than the filename sent by the server when making a request for that URL. – WBT – 2017-10-09T14:18:38.587
0
If you use PHP then it might be easy one for you using "Content-disposition:" tag. It forces the browser to download the given file, without displaying or playing it.
Make a small php script and upload your file in the same folder. The sample script is
<?php
header('Content-disposition: attachment; filename=movie.mpg');
header('Content-type: video/mpeg');
readfile('movie.mpg');
?>
Fount this solution at http://www.boutell.com/newfaq/creating/forcedownload.html
Hope this helps.
The opposite: http://superuser.com/questions/43379/force-view-text-file-instead-of-download-in-firefox
– Ciro Santilli 新疆改造中心法轮功六四事件 – 2015-04-23T05:49:27.860