fixed a caching issue with asynchronous requests in IE. r=igrcic, tschaub (closes #1896)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8816 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-02-03 23:09:39 +00:00
parent f9939f1cfe
commit 85a59b21ac
2 changed files with 33 additions and 14 deletions

View File

@@ -150,7 +150,15 @@ OpenLayers.Request = {
};
// send request (optionally with data) and return
request.send(config.data);
// call in a timeout for asynchronous requests so the return is
// available before readyState == 4 for cached docs
if(config.async === false) {
request.send(config.data);
} else {
window.setTimeout(function(){
request.send(config.data);
}, 0);
}
return request;
},