Home » Questions » Computers [ Ask a new question ]

Force view text file instead of download in Firefox?

Force view text file instead of download in Firefox?

Often times I'll click on a random link to a .sh or .py or .cpp or ... file in Firefox, and all I want is to view the code. I don't have a Firefox handler set up for every text file extension under the sun, and I don't want to have to. Is there an easy way to force Firefox to view the file as text instead of trying to save (or open in external app)?

Asked by: Guest | Views: 230
Total answers/comments: 2
Guest [Entry]

Maybe you should give this addon a try. I've never used it but it looks like it might work for you.
Guest [Entry]

"Answered HERE

to display file add below line(s) in .htaccess

AddType text/plain .txt
AddType text/plain .log

This is signal Firefox that you don't have to download the file instead view file as plain text.This technique can be applied to all the files that you need to view instead off download."