Closed Trott closed 12 years ago
Note that <script>
tags should still use text/javascript
for the type
attribute (or better yet just omit the type
attribute altogether--totally valid in HTML5). IE does not like application/javascript
in <script>
tag's type
attribute. But that's the <script>
tag. This issue is being filed about the HTTP header in the header()
function in PHP. That should be application/javascript
.
The reason that text/javascript
is used in the HTTP header was simply because that's the type being used in the script
tag as well.
HTTP headers for JS files should use application/javascript as the content type. text/javascript is obsolete. See http://www.rfc-editor.org/rfc/rfc4329.txt