My JavaScript function is as bellow :
function getActivityDiscussed(str,id)
{
var xmlhttp;
if (str=="")
{
document.getElementById("list_bottom").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("list_bottom"+id).innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","<?php echo base_url($client_url.'communications/getActivityDiscussed'); ?>/"+str,true);
xmlhttp.setRequestHeader("Cache-Control", "no-cache");
xmlhttp.setRequestHeader("Pragma", "no-cache");
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
xmlhttp.send();
}
This ajax call is not working in IE-9.
I have cleared the cache by using following code :
xmlhttp.setRequestHeader("Cache-Control", "no-cache");
xmlhttp.setRequestHeader("Pragma", "no-cache");
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
But I have to use these code for each ajax request.
Is there any way to disable the cache globally?
Thanks in Advance
you must have included which methods you have tried and these are not desired. – Mahendra Jan 05 '15 at 07:27