开发者

JSON compatibility Issue with Internet Explorer 9

开发者 https://www.devze.com 2023-04-04 23:20 出处:网络
Fetching JSON data is working fine in Google Chrome but in Internet Explorer 9, the brows开发者_如何学Goer shows this instead:

Fetching JSON data is working fine in Google Chrome but in Internet Explorer 9, the brows开发者_如何学Goer shows this instead:

Do you want to open or save the file?

How do I correct this?


Does the server set a Content-Type-header? Ex.

Content-Type: application/json

The browser usually knows that application/json (like text/html etc.) isn't for download, but for the browser itself.

If you don't set it, the broser may think it's just a plain text file and offer it as a download to the user.

0

精彩评论

暂无评论...
验证码 换一张
取 消