When serving JavaScript files, is it better to use the application/javascript or application/x-javascript

According to the IETF’s ECMAScript Media Types Updates as of 22 February 2021, the RFC-4329 is obsolete.

Therefore:

  • text/javascript is a recommended standard (both by IETF and by MDN)
  • application/x-javascript was experimental while deciding to move to…
  • application/javascript is obsolete

Leave a Comment