问题
I was working for a client, and his server doesn't allow running javascript. I tried to re-create and re-upload the JS files but the server keeps changing the file type into text. What's up with this? See screenshot below...

回答1:
You need to add the .js file MIME type in your Apache http.conf with AddType:
AddType application/x-javascript .js
This will tell Apache to serve .js
files with the application/javascript type you need.
来源:https://stackoverflow.com/questions/22100557/javascript-jscript-file-parsed-as-text-on-apache-server-and-cant-be-run