Difference between app / javascript and text / javascript
I was reading the HTML 5 Canvas Animation tutorial with javascript (of course). In the title, the author used
application/javascript
, which is pretty new to me, because I only saw text/javascript
. Can anyone please help? Chances are this question has been asked before, but I'm using a phone for this, so I don't see any similar questions.
thank
+3
source to share
3 answers
text / javascript - deprecated application / javascript - current official MIME type for JS
However, browsers ignore the content type sent by the server and pay too much attention to the type attribute (and many still don't recognize the app / javascript).
Use application/javascript on the server
Use text/javascript as a hack in type attributes in HTML documents
+1
source to share