What content type should have JSON encoded data?

Possible Duplicate:
The right JSON content type?

Hi

If I send some stuff in a ajax request with json_encode(...) what "Content-type" should I set with header() ? Same like HTML? (text/html)

And does this setting affect the site in any way?


See What is the correct JSON content type?

The correct content-type is: application/json

链接地址: http://www.djcxy.com/p/1236.html

上一篇: 正确的MIME类型用于返回JSON实体

下一篇: 什么内容类型应该有JSON编码数据?