Solution - jQuery post doesn't work in Internet Explorer (IE)

Posted by Sheonarayan under jQuery on 6/18/2014 | Points: 10 | Views : 1606 | Status : [Administrator] | Replies : 1

jQuery method doesn't work. The problem I was facing is that when I was trying post ajax request to the server with type "POST", the form input values were not going to the server instead I was getting null for each input element. The same code works in other browser but not in the Internet Explorer.

type: "POST",
url: 'http://localhost:28206/api/PersonalDetails/PostPersonalDetails',
data: JSON.stringify(PersonalDetails),
contentType: "application/json;charset=utf-8",
processData: true,
success: function (data, status, xhr) {
alert("The result is : " + status);
error: function (xhr) {


After spending a lot of time in search engines and digging a lot to the subject, finally found the solution. The internal mechanism of the IE doesn't allow POST method of Ajax so we need to keep a meta http-equiv element in the head to ensure that the IE behaves like previous version not the latest version.

So keep below code inside <head></head> of your page

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">

and the same code that was not working in Internet Explorer earlier will start working.

Hope this will help someone facing the similar problem.

Sheo Narayan


Posted by: Vuyiswamb on: 7/8/2014 [Member] [MVP] [Administrator] NotApplicable | Points: 25

hi Sheo please update to the correct Section Thanks

Thank you for posting at Dotnetfunda

Sheonarayan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response