Difference Between application/x-javascript and text/javascript Content Types



The text/javascript content type is obsolete. This was used in the early days of Html.

application/x-javascript was an experimental content type(hence the x-). You should not be using this in your application.

The correct content type to use in browsers is application/javascript. This helps browsers accept the content as js code.

Updated on: 2019-12-02T06:07:38+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements