How to get IE to open JavaScript as text

Solution 1:

Try adding an entry for JS files to the MIME type database in the registry via the following .REG file (courtesy Cheeso's answer here):

Windows Registry Editor Version 5.00
;
; Tell IE to open JS documents in the browser.
; 25336920-03F9-11cf-8FD0-00AA00686F13 is the CLSID for the "Browse in place".
;

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/x-javascript]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/javascript]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00