Why disabling cache doesn't work?
Here is my script
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.ajaxSetup({
// Disable caching of AJAX responses
cache: false
});
jQuery("#button1").click(function (e) {
window.setInterval(refreshResult, 3000);
});
function refreshResult()
{
//alert("In refreshResult");
jQuery("#divResult").load("/Home/Refresh");
}
</script>
It updates part of a web page every 3 sec. It works only once after clearing web browser cache, after that requests are made to /Home/Refresh without interval of 3 seconds and nothing is displayed on the web page.
I am using ASP.net MVC 2 and c#.
I would be grateful for an answer.