Issue
I am delivering a JS response from a PHP file. When setting the Content-Type
header which value should I use, application/javascript
or text/javascript
?
What’s the difference between the two?
Solution
According to the IANA Registered MIME media type list, JS has two registered MIME types; the obsolete text/javascript
and the now official application/javascript
.
Thus, use application/javascript
.
Answered By - You Answer Checked By - Timothy Miller (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.