Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to let XMLHttpRequest not cach in IE
    text
    copied!<pre><code>if(xmlhttp) { xmlhttp.open("GET","DokterWeek_KlantoverzichtServletAjax?" + $(this).prop("href").split("?")[1],true);//gettime will be the servlet name xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(null); } }); }); function getXMLObject() //XML OBJECT { var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP") // For Old Microsoft Browsers } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") // For Microsoft IE 6.0+ } catch (e2) { xmlHttp = false // No Browser accepts the XMLHTTP Object then false } } if (!xmlHttp &amp;&amp; typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera,chrome Browsers } return xmlHttp; // Mandatory Statement returning the ajax object created } var xmlhttp = new getXMLObject(); //xmlhttp holds the ajax object function handleServerResponse() { document.getElementById("pop1").innerHTML = xmlhttp.responseText; //Update the HTML Form element } </code></pre> <p>Hello, I have the following problem (the code works), the xmlhttpRequest(ajax-call) refreches when I use firefox or Chrome (so it works nice). But IE 9.0+ caches the XMLHttprequest, so it never refreches. I read alot about this problem on the internet,but i really cannot find any solution to this problem. </p> <p>Can anybody tell me the possibilities to fix this? I think it is fixable with using the jquery ajax, but I don't have the brains to tune this whole script into jquery. Some say you can set the live-time to 0 but I don't find this. (I communicate my Ajax with a servlet) Somebody knows an clear,easier solution?</p> <p>Thank you very much</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload