This question is an exact duplicate of:
Whenever I try to view .js in IE8 by just visiting the .js url, it prompts for a download. how can i view the actual code without downloading it?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Press F12 in IE8
select js script:
1 year ago