.load (), fadeOut () and fadein () do not work in IE8

I searched for this before posting. I have a page on my site where I need to update data every X seconds. i use `

var s= setInterval(function() { $('#responsecontainer').fadeOut("slow").load('table_data.php?pair_id=<?echo $pair_id?>').fadeIn("slow"); }, 5000); var s= setInterval(function() { $('#responsecontainer2').fadeOut("fast").load('last_modifed.php').fadeIn("fast"); }, 5000); 

`

It works fine in FF and Chrome, but not in IE8. I don’t mind seeing that he downloads data every time, but he doesn’t even do it, I tried the letter

 $('#responsecontainer').load('table_data.php'); 

and it loads the old data from the file, even if I change it.

Page here (is it in Hebrew, by the way) any help?

+4
source share
2 answers

Your table_data.php page returns 304 Not Modified , which means you have a cache installed. Add headers to this file to prevent caching , and it should work fine.

+1
source

Make sure the page is not cached. A typical approach is to use a unique timestamp or value, for example

 'table_data.php?pair_id=<?echo $pair_id?>&no-cache=' + (new Date()).getTime() 
+1
source

Source: https://habr.com/ru/post/1412272/


All Articles