: What MIME type are you meant to use for JavaScript files? In the html we always use <script type="text/javascript" charset="utf-8" src="???"></script> (the ECMA stuff confuses some browsers)
In the html we always use <script type="text/javascript" charset="utf-8" src="???"></script> (the ECMA stuff confuses some browsers) but on the HTTP side what are you meant to use as the Content-Type?
By instinct this would also be text/javascript, but Apache uses application/javascript and Amazon uses application/x-javascript.
Some firewall admins block any MIME types matching application/*; but which MIME type are you meant to use from a webmaster perspective? What is the "right" thing to do.
More posts by @Reiling115
2 Comments
Sorted by latest first Latest Oldest Best
This page has a list of what's accepted by which browser, for example:
text/javascript
Opera 7.54+
IE 5+
Firefox 1.0.7+
Safari 2.0.3+
iCab 3 Beta 394
Camino 2006021400
The correct Content-Type is application/javascript
See: What is the Javascript MIME Type? on Stack Overflow
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.