IE prompts to open or save json result from server

后端 未结 9 1239
既然无缘
既然无缘 2020-11-29 22:28

Internet explorer in compatibility mode gets the data from the server in an ajax callback method, and pops-up a dialog if I want to save the data or open. How to get rid of

9条回答
  •  我在风中等你
    2020-11-29 22:31

    I changed the content-type to "text/html" instead of "application/json" server side before returning the response. Described it in a blog post, where other solutions have also been added:

    http://blog.degree.no/2012/09/jquery-json-ie8ie9-treats-response-as-downloadable-file/

提交回复
热议问题