What is the correct JSON content type?
What is the correct JSON content type?
I have seen so many purported "standards" for the JSON content type:
content-type
application/json
text/x-json
application/x-javascript
text/x-javascript
text/javascript
But which one is correct, or best?
Last Updated:
Tags: JSON
Answer
The correct content type is
For JSON text - application/json
For JSONP - application/javascript
Check out our Complete list of MIME types.
Related Tutorial
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.