View js files in firefox

qwertymk picture qwertymk · Feb 14, 2011 · Viewed 10.1k times · Source

Everytime I try to navigate to a JS file on Firefox I get a save-as dialog. I would like to just be able to view the source in the actual browser and not have to download and open the file in another editor.

Is there any way I can force Firefox to view the files?

EDIT here's a snapshot:

snapshot

Answer

Cheeso picture Cheeso · Feb 14, 2011

In Firefox, You can use the view-source: psuedo protocol.

Enter into the URL address bar:

view-source:http://server/whatever/your/url/is.js

See also:
How can I convince IE to simply display application/json rather than offer to download it?