それは奇妙です-私のajax呼び出しはIEでキャッシュされて返されますが、FFでは適切に動作しています。なぜアイデアはありますか?
function createRequestObject(){
var req;
if(window.XMLHttpRequest){
//For Firefox, Safari, Opera
req = new XMLHttpRequest();
}
else if(window.ActiveXObject){
//For IE 5+
req = new ActiveXObject("Microsoft.XMLHTTP");
}
else{
//Error for an old browser
alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
}
//alert (req);
return req;
}
//Make the XMLHttpRequest Object
var http = createRequestObject();
var head;
function sendRequestTwo(method, url, head1){
head = head1
if(method == "get" || method == "GET"){
http.open(method,url);
http.onreadystatechange = handleResponseTwo;
http.send(null);
}
}
function handleResponseTwo(){
if(http.readyState == 4 && http.status == 200){
var response = http.responseText;
if(response){
document.getElementById(head).innerHTML = response;
//window.scrollBy(0, 200);
}
}
}