douhanzhen8927 2016-03-21 09:29
浏览 36

在Internet Explorer中不刷新页面内容(仅在浏览器重新打开后)

I am trying to make chat which must work in Internet Explorer. Code for content refresh is below (I know it could be made better way, but it works in every other browser...)

But in IE, script is working (I mean it's doing that refresh), but content is still the same. Even if I write something to the file "chat_vypis.php"... When I try to refresh it with F5, it doesn't work as well... In "chat_vypis.php" is only SELECT query and echo with result. You can check it at sdbt.mobydyk.cz .

Here is script for refresh, thank you for every advice!

<script type="text/javascript">
$(document).ready(function(){ 

    var auto= $('#chat');
    var refreshed_content;  
        refreshed_content = setInterval(function(){
        auto.load("chat_vypis.php");}, 
        1000);                                      
        console.log(refreshed_content);                                      
        return false; 
});
</script>
  • 写回答

2条回答 默认 最新

  • doupijin0397 2016-03-21 09:41
    关注

    IE is maybe caching the ajax request and doesn't even send them. Try:

    $.ajaxSetup({ cache: false });
    

    at the start of your document ready function

    评论

报告相同问题?

悬赏问题

  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退