Ticket #12790 (closed bug: cantfix)
AJAX Post on IE10 / Windows 8
| Reported by: | Tigroo | Owned by: | Tigroo |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8.2 |
| Keywords: | Cc: | jaubourg | |
| Blocking: | Blocked by: |
Description
AJAX Post on IE10 / Windows 8 is not working.
Smaple JS:
$.ajax({
type: "POST",
url: "test.php",
data: { test: "John" }
}).done(function( msg ) {
alert( "output: " + msg );
});
Sample test.php
<?php echo "I GOT IIIITTTT : ".$_POST['test']; ?>
Change History
comment:2 Changed 7 months ago by mikesherov
- Cc jaubourg added
Jaubourg, could you kindly take a look at this. IE10 was just released, so I want to be extra cautious with this bug. Thanks!
comment:3 Changed 7 months ago by jaubourg
I'd gladly look with a jsfiddle demonstrating the issue :)
comment:4 Changed 7 months ago by dmethvin
- Owner set to Tigroo
- Status changed from new to pending
@Tigroo, please provide a test case that demonstrates the problem, preferably at jsfiddle.net or jsbin.com.
comment:5 Changed 7 months ago by jonesjunior3
Hi
i have the same issue, please see http://stackoverflow.com/questions/13101729/jquery-ajax-call-works-in-all-browser-except-ie-10
comment:7 Changed 7 months ago by anonymous
Having the same issue on Windows 8 but with Chrome too... could this be an underlying OS issue rather than IE10?
comment:8 Changed 7 months ago by anonymous
Any update on this issue? Do you need any further information?
comment:9 Changed 7 months ago by jaubourg
As said above, a jsfiddle, or jsbin, demonstrating the issue.
comment:10 Changed 7 months ago by anonymous
you have to be using ie10 on windows 8 for it not to work
comment:11 Changed 7 months ago by dmethvin
- Status changed from pending to closed
- Resolution set to worksforme
I am running Windows 8 with IE10 10.0.9200.16384 and your example works fine for me, it echoes back the data. This simpler version also works: http://jsfiddle.net/RebaT/5/show
Perhaps Microsoft slipstreamed in some last-minute patch to fix it. If you're still experiencing problems, make sure you have run Windows Update. Also be sure there are no toolbars or other add-ins installed.
comment:12 Changed 7 months ago by anonymous
Hi I have checked windows update, I have also removed ie 10 and reinstalled it. the request body is always empty. Do you have any other suggestions?
comment:13 Changed 7 months ago by dmethvin
Try creating a simple example with bare XMLHttpRequest and a request body to see if that works. That way you can determine whether jQuery is involved at all.
comment:14 Changed 6 months ago by anonymous
We recently ran into this as well on a 32-bit machine that had just upgraded from Windows 7. Oddly, the behaviour couldn't be reproduced while the metro version of IE10.
The response body was simply empty (triggering our automated error handling).
Resetting to default IE10's settings resolved the issue, but it's worrying if this is a common scenario in the field.
comment:15 Changed 6 months ago by dmethvin
Resetting to default IE10's settings resolved the issue
What was the difference between the previous settings and the default settings?
It doesn't sound like this is a jQuery problem, but if anyone can contribute more than a "me too" response it would be welcome. As I said above, a non-jQuery repro case would be helpful too.
comment:16 Changed 6 months ago by Scootin159
I too had this same issue (clean Windows 8 install), and restoring the default settings in IE 10 resolved the issue for me.
I'm not aware of any settings I had changed from the baseline install (I never use IE other than for web testing, so I try to leave it as "default" as possible).
comment:17 Changed 6 months ago by Scootin159
This may or may not be related information:
Environment: Fresh windows 8 install, restored IE 10 defaults, all updates Website is available at 2 URL's, AJAX call is hardcoded to go to "URL 1" at both URL's
Test Case:
- Open browser to URL 1, ajax works
- Modify URL in address bar to URL 2, ajax works
- Close browser window
- Reopen, go to URL 2, ajax does not work
Given this, I'm wondering if this may be an issue with IE 10 caching a listing of "allowed URL's" per-tab, and not allowing you to access URL's outside of that via AJAX.
Added information, if and only if AJAX fails, I get the following error in the IE 10 developer tools console:
SEC7118: XMLHttpRequest for <<url 1>> required Cross Origin Resource Sharing (CORS). SEC7120: Origin <<url 2>> not found in Access-Control-Allow-Origin header. SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
comment:18 Changed 6 months ago by werner@…
The sample above most definitely does not work in IE10 v10.0.9200.16438 on Windows 7.
The POST data does not get sent to the server which can easily be confirmed with a Fiddler/Charles trace. Links to http://fiddle.jshell.net/_display/test.php removed because it thinks I' spamming.
The above code sample using Chrome (running in jsFiddle with jQuery 1.8.2 and catching the request in Fiddler):
POST test.php link? HTTP/1.1 Host: fiddle.jshell.net Connection: keep-alive Content-Length: 9 Origin: http://fiddle.jshell.net X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: */* Referer: removed? Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,en-ZA;q=0.6 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
test=John
The POST data is clearly visible. Using the same code but running in IE10:
POST test.php link? HTTP/1.1 Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Referer: removed? Accept-Language: en-ZA Accept-Encoding: gzip, deflate User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) Host: fiddle.jshell.net Content-Length: 0 DNT: 1 Connection: Keep-Alive Pragma: no-cache
No POST data is in the request. Just for good measure I ran the same test in IE10 but the RTM in Windows 8. Desktop works correctly but it appears it's running in compatibility mode:
POST test.php link? HTTP/1.1 Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Referer: removed? Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/6.0; Touch; .NET4.0E; .NET4.0C; Tablet PC 2.0) Host: fiddle.jshell.net Content-Length: 9 DNT: 1 Connection: Keep-Alive Pragma: no-cache
test=John
I couldn't get the Fiddler loopback working in IE10 Metro so my testing stopped there...
comment:19 Changed 6 months ago by dmethvin
Does the same problem happen when using a bare XHR? In other words, is this a jQuery problem, or is it an IE10 problem?
comment:20 Changed 6 months ago by anonymous
I too have same problem works in all browser expect IE10 Release preview for Windows 7 - 32 bit
comment:22 Changed 6 months ago by werner@…
OK, we can write this off as an IE10 in Windows 7 bug. Standard XHR does not work either when POSTing in Win7-IE10:
var xmlhttp=new XMLHttpRequest();
xmlhttp.open("POST","test.php",true);
xmlhttp.send(JSON.stringify({ test: "John" }));
The above code still has no POST data in the body when using IE10 (async or not). This is only an issue on the desktop in Windows 7. IE10 in Windows 8 is working correctly. MS really dropped the ball here...
comment:23 Changed 6 months ago by dmethvin
Thanks @werner! IE10 on Windows 7 is still a preview, not a release. If it isn't happening on Windows 8 anymore I suspect Microsoft just needs to back-port some patches that haven't landed in the Windows 7 version yet. In any case it doesn't sound like something jQuery can or should fix or work around, since it seems like a fix should arrive shortly.
comment:24 Changed 6 months ago by dmethvin
#12925 is a duplicate of this ticket.
comment:25 Changed 6 months ago by nicholas@…
That basic XHR example also fails in Windows 8, IE10 desktop mode. Looks like an MS issue. What a mess.
comment:26 Changed 6 months ago by ericlaw (ex-msft)
If you want to get Fiddler working in Metro, follow these steps: http://www.fiddler2.com/r/?win8el
Important: If you have "Free Download Manager" or a similar add-on installed, it is known to cause this problem with IE10 (even when disabled). The issue is that Free Download Manager has an incomplete thunk of some URLMon interfaces, and this interferes with POST uploads.
comment:27 Changed 6 months ago by dmethvin
- Status changed from closed to reopened
- Resolution worksforme deleted
comment:28 Changed 6 months ago by dmethvin
- Status changed from reopened to closed
- Resolution set to cantfix
This appears to be a widespread problem with POST requests on IE10, one that we do not control, so there is no need to post further feedback in this ticket. Here is the Microsoft ticket for the problem; note that you will need to create a login to view:
comment:29 Changed 8 weeks ago by anonymous
I faced the same problem but it was caused by HttpWatch plugin in IE10. See release notes http://www.httpwatch.com/download/versionhistory/ (Version 8.5.35 - 28 Mar 2013 )
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

More precisions : It seems like all data arguments are not passing. If switch the compatibility mode from IE10 to IE9, it works.