JS with Java SPRINGMVC background, after successful return message, Chrom FF is normal, only after IE submitted JSON prompt to return to download, view type
Application/json Google found that the original is IE does not support the logo, so as a file download
There are generally three ways to do this online:
One is to specify response manually
Second, modify the configuration file (but I have been successful in the experiment)
Three is no longer use @ResponseBody, the use of responseentity<t> this method is the highest success rate, but the change is more troublesome, if you have a lot of places have been used @ResponseBody words.
I'm using the third kind of
The responseentity<t> T type can be any, but note is the same as return, the modified return type becomes
Key value
Content-typetext/plain;charset=utf-8
IE normal identification, solve
@RequestMapping (value = "/")
Public responseentity<map<string, object>>
Updateuserpic (HttpSession session,httpservletresponse response) throws IOException {
map<string, object> map = new hashmap<string, object> ();
httpheaders headers = new Httpheaders ();
Headers.setcontenttype (Mediatype.text_plain);
return new responseentity<map<string, object>> (Map, headers, httpstatus.ok);
}
Fix IE return JSON hint download responseentity method