won - open files without download(save) them to the computer firefox




How to force Firefox to open a file which does not have a.txt extension as if it did have one? (4)

I have files which are just plain text, but have extension which is not .txt. Lets say the extension is .abc.

When I click on a link that points to such a file, such as file.abc, I'd like Firefox to open the file as if it was file.txt (i.e. open it inside Firefox, listed inside Firefox itself, just like what happens when I click on file.txt) instead of it asking how if I want to save it or open it, and then I have to go select the application to open it with, such Notepad or whatever.

I went to Tools → Options → Applications, but did not know what to do.

Added: Based on the comment below and the answer so far, it looks I did not explain myself well.

I want Firefox to open the file as if the file had .txt extension. When you click on a link in Firefox which has .txt, what does Firefox do? It does not open the file in Notepad or whatever, it opens right there, inside the browser, showing the listing of the file. I want to the same to happen when .abc extension.

I do not want to go around mess up with the Windows OS for this.


For a quick solution, you can add view-source: before the url.


Navigate to Control Panel\Programs\Default Programs\Set Default Programs (if you are on win7) and click on "choose default for this program" hopefully this should get you what you want. Thanks

You can see this in XP by opening Windows Explorer, clicking Tools, selecting Folder Options, then going to the tab marked File Types. This lets you change a file association to a different program

Source http://www.guardian.co.uk/technology/askjack/2011/mar/10/zip-files-windows-vista


You should try this addon: Open in Browser.

It offers the possibility to display documents in the browser window.


for nightly 26 alpha, opening .java files as text/plain

find ~/.mozilla -name mimeTypes.rdf

add children to node /RDF:RDF

<RDF:Description RDF:about="urn:mimetype:text/plain"
               NC:value="text/plain"
               NC:editable="true"
               NC:fileExtensions="java"
               NC:description="Java source file">
  <NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
</RDF:Description>




firefox