IE is famous for caching requests like this. I'd suggest you add a unique argument to the URL to bust the caching.
<script type="text/javascript">
var auto_refresh = setInterval(function () {
var now = new Date().getTime();
$('#jqueryFuction').load('ping?sessioneWeb=${requestScope.sessioneWeb}×tamp=' + now).fadeIn("slow");
}, 1000); // refresh every 10000 milliseconds
</script>
Also, the fadeIn()
won't work unless #jqueryFuction
is set to hidden before you do the .load()
.
I'd also argue that you really don't want to be doing an ajax call every second. Some ajax calls will take more than a second to even process and if you have a lot of viewers, this will bring your server to its knees. Think about a much longer time interval or a more efficient way to let your server tell you when there's something new (like websockets).