What is the correct JSON content type?

Posted:

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

Learn JSON

Learn JSONP

Share this Page

Meet the Author