IE prompts to open or save json result from server

后端 未结 9 1243
既然无缘
既然无缘 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:53

    Even though it's not supposedly the correct way, setting the content type to text/html made IE deal with this correctly for me:

    return Json(result, "text/html");
    

    Works in all the version that F12 tools gives you in IE9.

提交回复
热议问题