Home > Web Front-end > JS Tutorial > Jquery returns json data and prompts for download in IE browser_javascript skills

Jquery returns json data and prompts for download in IE browser_javascript skills

WBOY
Release: 2016-05-16 16:47:55
Original
1270 people have browsed it

Today I encountered a problem where Jquery returns json data, and IE browser prompts for downloading. After submitting the data, the data returned is originally json data. It is normal when tested in Fire Arc, but IE always prompts to save. I searched online. Most of them say that the ContentType is set to "text/xml". I tested it and the return value is undefined.

The original return value setting: context.Response.ContentType = "application/json";

Try: context.Response.ContentType = "text/xml;"; failed

Later tried: context.Response.ContentType = "text/plain;charset=UTF-8";

Success!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template