.load(),fadeOut()和fadein()在IE8中不起作用

时间:2012-05-13 16:09:52

标签: jquery internet-explorer-8 load

我发布之前已经搜索过了.. 我的网站中有一个页面,我需要每隔X秒刷新一次数据。 我在用 `

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);

`

它在FF和Chrome中运行良好,但在IE8中运行不正常。 我不介意每次都加载数据,但它甚至都没有,我试过 写作

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

并且即使我更改了它也会从文件中加载旧数据。

页面为here(希伯来语,顺便说一下) 任何帮助??

2 个答案:

答案 0 :(得分:1)

您的table_data.php页面正在返回304 Not Modified,这意味着您已将其设置为缓存。将该文件的标题添加到prevent cacheing,它应该可以正常工作。

答案 1 :(得分:1)

确保页面未缓存。一种典型的方法是使用唯一的时间戳或类似

的值
'table_data.php?pair_id=<?echo $pair_id?>&no-cache=' + (new Date()).getTime()
相关问题