Both in my development and production environment, IE 10 is refusing to send any POST data via a simple $.ajax call.
My script looks like this:
d = 'testvar=something';
$.ajax({
data: d,
success: function(h){
console.log(h);
}
});
The actual ajax request is going through, but no post data???
The request headers look normal:
Request POST /steps/~do HTTP/1.1
Accept */*
Content-Type application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://localhost:8080/steps/
Accept-Language en-GB,en-AU;q=0.7,en;q=0.3
Accept-Encoding gzip, deflate
User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host localhost:8080
Content-Length 0
DNT 1
Connection Keep-Alive
Cache-Control no-cache
But the request body is empty! (I'm using IE's network tab in their F12 dev bar to capture requests). In the PHP script, print_r($_POST); returns an empty array.
This works fine in IE 7 - 9, chrome, FF and safari, but breaks in IE10?
I'm not sure if I've missed something, or if IE 10 is just buggy?
EDIT
I've set the global ajax settings as follows:
$.ajaxSetup({
url: ROOT+'~do', // ROOT is either http://localhost/.../~do or http(s)://www.steps.org.au/~do depending on production or development environment
type: 'POST'
});
Further Edit
Using IE version 10.0.9200.16384 on Windows 8 Pro 64 bit
Direct copy/paste of request headers are:
Key Value
Accept */*
Accept-Encoding gzip, deflate
Accept-Language en-GB,en-AU;q=0.7,en;q=0.3
Cache-Control no-cache
Connection Keep-Alive
Content-Length 0
Content-Type application/x-www-form-urlencoded; charset=UTF-8
Cookie __utma=91949528.1947702769.1348201656.1353212510.1353237955.6; __utmz=91949528.1348201656.1.1.utmcsr=localhost|utmc