posted 6/28/2013 by Raghav Khunger
After upgrading IE to IE10 on my machine (Windows 7 64 bit) I was facing weird issues with ajax "POST" calls. We had a problem with posting messages in our product Communifire. The data was not posted to server with IE10, I confirmed that with fiddler. The same was working with IE8, IE9, FF, Chrome and Safari. I tried all the below mentioned stuff in IE10 to POST data to server:
$.ajax({ url:"/login", type: "POST", data: {name:name, password:pass}, dataType: "json" }).done(success);
$.post("/login", {name:name, password:pass}, sucess);
even changing
data: {name:name, password:pass}
to
data: {"name":name, "password":pass}
but none was working. I will add one more information here regarding the version of IE 10, it is 10.0.9200.16618, that latest while I am writing this blog.
This seems to be bug in IE10 and has not beed fixed so far (28th June 2013). It is even reported here http://bugs.jquery.com/ticket/12790#comment:22
More..
http://bugs.jquery.com/ticket/12790#comment:28
The solution is to add the following meta tag:
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE9" >
by adding the above meta tag, IE10 will run your javascript in IE9 compatible mode.
Adding that tag fixed my issue and with that tag added I have confirmed the ajax post calls working in IE10 along with IE9 and IE8 too.
What kind of email newsletter would you prefer to receive from CodeAsp.Net? 18