the correct MIME Type for JSON?
Possible Duplicate:
The right JSON content type?
i have problem on json it is only displaying " Content-Type: text/html" i am testing on localhost and my online code is
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/javascript');
//header('Content-type: text/javascript');
//header('Content-type: application/json');
use this
header('Content-type: application/json');
for JSON
data
The application/json
Media Type for JavaScript Object Notation (JSON)
header('Content-type: application/json');
chech this from IANA
good read:
Application Media Types
JSON的MIME类型是application/json
上一篇: 什么内容类型应该有JSON编码数据?
下一篇: JSON的正确MIME类型?