It seems that you may be utilizing code similar to the example below:
<html>
...
<body onunload="inOnUnload();">
...
In this scenario, there is an inOnUnload()
function defined as follows:
function inOnUnload() {
xmlhttp.open("POST", "http://some-location", /*async*/ true);
http.send(request);
}
The issue arises in IE10 where it appears to abort the request once the document has been fully unloaded, causing the form data to not have a chance to leave the client. To successfully send data during onunload
events in IE10, you need to set the async = false
parameter in XMLHttpRequest.open(...)
.
The revised solution that worked for me is shown below:
function inOnUnload() {
xmlhttp.open("POST", "http://some-location", /*async*/ /*!!!*/ false);
http.send(request);
}