IE10 The following Internet Explorer will be prompted to download the JSON file when it receives the Application/json type of response

Source: Internet
Author: User

IE10 The following Internet Explorer does not support Application/json this response format, so you need to first turn the object into a JSON string on the server and then set the type of Content-type to text/html, and then return to the line.

If you are using SPRINGMVC, it is useless even if you set the response header information in the controller layer with the response object, because if you identify the @responsebody annotation, Spring automatically determines whether you want to give your return value to a View object based on your return value type (depending on your SPRINGMVC configuration, typically JSON), and if you configure JSON, it will automatically return the Application/json type. The workaround is to use the string type as your return value type.

IE10 The following Internet Explorer will be prompted to download the JSON file when it receives the Application/json type of response

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.