[jQuery] Caching?
[jQuery] Caching?
Hello!
I need to load a value (returned by a php script) into a
textbox each 10 seconds, and reload web if this value change. I'm using
next code:
<script src="jquery.js"></script>
<script>
$(document).ready(function()
{
//ajaxTime.php is called every second to get time from server
var refreshId = setInterval(function()
{
$.get("contar.php?accion=respuestas", function(data){
$('#txtNuevo').val(data);
if(parseInt($('#txtNuevo').val()) > parseInt($('#txtUltimo').val())){
window.location.reload()
}
});
}, 10000);
//stop the clock when this button is clicked
$("#stop").click(function()
{
clearInterval(refreshId);
});
});
</script>
I have got one problem because it only loads the value
first time. After that, no more loads new values. I think the problem
is produce because Internet Explorer caches the web and reload old
value. It works fine with Firefox, but I need make it work with IE too.
Is there any way to force reload not cached data from code?
Regards