Firefox opens a filetype (textfiles, txt) incorrectly

0

My Firefox (Quantum on Windows 7) keeps opening text files (with .txt suffix) in the browser, despite having set it to always ask for text documents in Settings -> General -> Applications. The settings work correctly e.g. for .pdf (Portable Document Format) and .rtf (RTF-File) files. But not for txt (Text-Documents).

I tried to locate the entries through the mimeTypes.rdf file in my profil folder [about:cache] but there I did not find any of the appropriate entries including pdf or rtf.

Any ideas what I'm doing wrong or what else to check?

I had partly success with randomly playing around with those setting:

network.protocol-handler.expose.file = true/false
network.protocol-handler.external.file = true/false

I got local text files to open in an external editor, but after some further playing around I couldn't get it to work anymore.

My other unsuccessful ideas were:

  • to assign a key to force it to open with an external application, like with the "forced download option", but not sure if exist to open files in an external application as well.

  • to add a "new filetype" as described in here. But using a new filetype does not add it to the application section. Editing mimeTypes.rdf to add it manually didn't work either.

  • As a workaround I'm using rtf files but but I would like to get it to work with text files or at least a "made up" filetype that opens in an external Texteditor.

PS. Just for references here are a some of the superuser questions/ansers I checked:

Albin

Posted 2018-10-08T18:37:18.533

Reputation: 3 983

Opening .txt files in the browser is default behaviour. I am not sure why opening .txt files in something other than your browser is so important to you, but see if you can change your default editor for text files instead (Notepad++ would be a good choice). Also make this change (for text and html files) in Internet Explorer options, if applicable. – 9A4Sc6GW4LkvRD – 2018-10-08T22:43:25.910

@YTreehuggerCymru all the options didn't work for txt files (downloading, always ask, open in standard application/application). Why should I make changes in Internet Explorer, what does it have to do with Firefox? – Albin – 2018-10-08T23:08:12.473

Sorry, - I should have said Control Panel > Internet Options (for me, anyway, - Windows 7 x64) on the Programs tab, for the default HTML editing application. Failing that, attempt to reset your FFQ browser (under Help, or question-mark, on the settings menu, if I am not mistaken). – 9A4Sc6GW4LkvRD – 2018-10-08T23:13:27.443

@YTreehuggerCymru Changing the HTML-Editor settings in the control panel doesn't help. Using a fresh instance/installation of firefox doesn't help either. – Albin – 2018-10-08T23:24:24.163

You don't indicate your OS, and there are some differences in Firefox by OS. It appears that Quantum has changed some options and where some things are stored. In my installation, text files are no longer listed under application settings in Preferences, and I don't have a mimeTypes.rdf file. In my Firefox profile, there is a file handlers.json. It includes some lists of file extensions, one list including txt, and under actions, ask is set to true. You don't list a URL containing a .txt file and I couldn't lay my hands on one, so couldn't test the behavior. – fixer1234 – 2018-10-08T23:58:43.660

@fixer1234 thanks! yeah, I just realized that... this was an old installation I kept updating (from before Quantum). I'll try to mess around with the handlers.json file maybe I get a solution... Just wondering why the changes in the config file made a difference and why it stopped working... strange! Anyway I updated my question (it's win7 by the way) – Albin – 2018-10-09T01:55:22.313

No answers