JSON数据的HTTP Header应该怎么标记?
程序员文章站
2024-02-12 12:48:40
...
第一种 header('Content-type: application/json'); 另一种 header('Content-type: text/json');
这两种有什么使用上的区别吗?
回复内容:
第一种 header('Content-type: application/json'); 另一种 header('Content-type: text/json');
这两种有什么使用上的区别吗?
http://*.com/questions/47...
application/json是更通用且符合标准的
application/json,这是标准 RFC 4672
第一种是标准兼容以后,第二种兼容IE6
IE6害死人系列
上一篇: 求 eshop,想做个商城,该如何处理
下一篇: Python中装饰器的理解和实现