Fortunately there is a fix that I found by combined multiple poor answers from various forums. Why people skip all the steps when explaining how to fix something always confuses me since they are trying to be helpful but provide answers that assumes their audience mostly knows the answer and just needs a nudge in a particular direction. In the pre-quantum days, the fix involved editing the mimeTypes.rdf file. Now it involves editing a different file called handlers.json. Now these instructions are going to assume you know the basics of your computer as some parts will change based on which version of Windows you have. If not sure how to do something like open Windows Explorer or Run, google it for your operating system.
To start, see how things are setup currently so you can tell if your changes worked.
- Go to the Hamburger Icon (three dashes stacked in a column) > then click Options.
- In the Options tab that opens, go to the search box and type "Applications" as see in screenshot (alternatively click "General" then scroll down to "Application" section).
- Take a mental snapshot or a literal one so can tell if your changes are working.
Add file extensions to this list:
- Via Windows Explorer or Run, go to: %AppData%\Mozilla\Firefox\Profiles > then double-click your Firefox profile folder (usually only one there or one with most recent change date).
- Scroll past the folders to the individual files and look for: handlers.json > copy this file and save it on your desktop. This is just a back-up in case have to reset your changes.
- Now in the Profiles folder right-click over handlers.json > click Edit
- A text file will open that looks something like this assuming Word Wrap is checked:
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{},"schemes":{"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"webcal":{"action":4,"ask":true,"handlers":[null,{"name":"30 Boxes","uriTemplate":"https://30boxes.com/external/widget?refer=ff&url=%s"}]}}}
- For each file type you want to add to the list, the goal is to insert this text in the correct location based on file format where FileType=""> is what you want to add:
,"application/FileType":{"action":0,"extensions":["FileType"]}
- Create your own list like example below keeping the beginning , and the ending }
Examples:
,"application/mp3":{"action":0,"extensions":["mp3"]}
,"application/rar":{"action":0,"extensions":["rar"]}
,"application/zip":{"action":0,"extensions":["zip"]}
- Combine that list, without spaces anywhere
Example:
,"application/mp3":{"action":0,"extensions":["mp3"]},"application/rar":{"action":0,"extensions":["rar"]},"application/zip":{"action":0,"extensions":["zip"]}
- Now delete the very first comma only
Example:
"application/mp3":{"action":0,"extensions":["mp3"]},"application/rar":{"action":0,"extensions":["rar"]},"application/zip":{"action":0,"extensions":["zip"]}
- Copy and paste your combined code
- Go back to the open handlers.json file. Look for this section of code at the very beginning:
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{}
- See those two brackets after "mimeTypes"? That is where you will paste your code.
Example:
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{"application/mp3":{"action":0,"extensions":["mp3"]},"application/rar":{"action":0,"extensions":["rar"]},"application/zip":{"action":0,"extensions":["zip"]}},"schemes":{"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"webcal":{"action":4,"ask":true,"handlers":[null,{"name":"30 Boxes","uriTemplate":"https://30boxes.com/external/widget?refer=ff&url=%s"}]}}}
- Save the text file (not "Save As", just "Save")
- Close Firefox.
- Re-open Firefox.
- Go to the Hamburger Icon > Options > type "Applications" in search box > see if your items are in the list (see screenshot)
- With my config, the default behavior is "Save File" but click the drop down for each and make changes as you see fit.
If you wish to add more formats later, go to the code and look for },"schemes":. You will make the changes right before the }.
For example, lets add an mkv file type. So from above the code is this: ,"application/mkv":{"action":0,"extensions":["mkv"]}
- To add:
Example:
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{"application/mp3":{"action":0,"extensions":["mp3"]},"application/rar":{"action":0,"extensions":["rar"]},"application/zip":{"action":0,"extensions":["zip"]}},"schemes":{"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"webcal":{"action":4,"ask":true,"handlers":[null,{"name":"30 Boxes","uriTemplate":"https://30boxes.com/external/widget?refer=ff&url=%s"}]}}}
- Now becomes
Example:
{"defaultHandlersVersion":{"en-US":4},"mimeTypes":{"application/mp3":{"action":0,"extensions":["mp3"]},"application/rar":{"action":0,"extensions":["rar"]},"application/zip":{"action":0,"extensions":["zip"]},"application/mkv":{"action":0,"extensions":["mkv"]}},"schemes":{"ircs":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"mailto":{"action":4,"handlers":[null,{"name":"Yahoo! Mail","uriTemplate":"https://compose.mail.yahoo.com/?To=%s"},{"name":"Gmail","uriTemplate":"https://mail.google.com/mail/?extsrc=mailto&url=%s"}]},"irc":{"action":2,"ask":true,"handlers":[null,{"name":"Mibbit","uriTemplate":"https://www.mibbit.com/?url=%s"}]},"webcal":{"action":4,"ask":true,"handlers":[null,{"name":"30 Boxes","uriTemplate":"https://30boxes.com/external/widget?refer=ff&url=%s"}]}}}
- Remember to close and re-open Firefox to apply the change.
If you mess up, don't forget you have the original file on your desktop. Just copy it and paste it back to the profiles folder, confirming you want to replace the previous file. Just like that you reset your changes. Alternatively you can close Firefox, delete handlers.json, and when you open Firefox again it will recreate the file as when program was first installed.
Thank you ! Worked for jpg :)
ReplyDeleteVery well done! Super explanation and you were right, others just skim over the subject without detailed info like yours. Thanks a bunch.
ReplyDeleteWorks like a charm, thanks
ReplyDeleteThis is no longer valid. Completely different formatting in that file.
ReplyDeleteThanks, this was on point and very helpfull...
ReplyDeleteThis really helped me, thank you so much! :)
ReplyDeleteI don't have an edit option when I right click on the handlers.json file.
ReplyDeleteThank you so much for this! I was getting mad with .fit extensions - I couldn't change the default behavior within firefox - after modifying the .json file I am :-)
ReplyDeleteThank god (or google) I found your article!
nice it fixed my bittorrent, thanx
ReplyDeleteThanks for this great tutorial! I'm running the MacOS version of Firefox and it works just as you describe.
ReplyDeleteOpen the Finder. From the Go menu, select "Go to Folder" (Keyboard Shortcut: Shift+Command+G) Type: ~/Library/Application Support/Firefox/Profiles
Very nice! Worked like charm! Thanks a lot.
ReplyDeleteThank you very much for this, it was driving me nuts.
ReplyDeletethank-you; there are 6.3M hits on Google for this problem, going back 14 years, yours' is the only one that works
ReplyDeleteplease note that "action":0 saves file automatically but change to "action":2 opens the file (helpful for torrent files)
ReplyDeleteThanks so much!
ReplyDeleteThat really explained how to edit the hander.json file very well to add file extention types. I was getting nowhere looking at google or reading other peoples methods and was getting irratated in having to click SAVE as the Do this... box was greyed out.
Brilliant, thank you. This worked perfectly in Waterfox 2020.04
ReplyDeleteBelieve it or not, this nearly 3 year old blog just helped me tonight. I finally upgraded to the latest version of FF (stuck with 56 for the longest time!) and really didn't like I couldn't set it to always save .rar files. Thanks for this!!!
ReplyDeleteWorks Like charm ! Thank you
ReplyDelete