2013-04-13 38 views
11

Khi tôi truy cập trang của mình, tiêu đề được tải đúng cách, nhưng sau một giây, nó sẽ thay đổi thành "Đang chờ http://example.com".

Đây có phải là lỗi từ IE hoặc từ mã của tôi không? - "Đang đợi http://mysite.com"

Trang tải, nhưng ngay cả sau khi mọi thứ được tải, tiêu đề vẫn tiếp tục, nhưng chỉ trong tab IE, vì trong tiêu đề khay như trước.

PS: Nó không xảy ra với Chrome. Và phiên bản tức là 10

Ảnh của vấn đề:
enter image description here

HTML My mã:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
    <head> 
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
     <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" /> 

     <title>DataTables Editor example</title> 
     <style class="include" type="text/css"> 
      @import "support/bootstrap/css/bootstrap.css"; 
      @import "support/bootstrap/dataTables/dataTables.bootstrap.css"; 
      @import "css/customTable.css"; 
     </style> 

     <script class="include" type="text/javascript" charset="utf-8" src="../../../media/js/jquery.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="../../../media/js/jquery.dataTables.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="../../TableTools/media/js/TableTools.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="../../TableTools/media/js/ZeroClipboard.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="../media/js/dataTables.editor.js"></script> 

     <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/js/bootstrap.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/dataTables/dataTables.bootstrap.js"></script> 
     <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/dataTables/dataTables.editor.bootstrap.js"></script> 

     <script class="include" type="text/javascript" charset="utf-8" src="./js/custom.js"></script> 

    </head> 
    <body class="c_body"> 
     <div class="mContainer"> 
      <div id="dt_div"> 
       <table class="table table-striped table-bordered display" id="example"> 
        <thead> 
         <tr> 
          <th style="text-align: center;">Data</th> 
          <th style="text-align: center;">Tema</th> 
          <th style="text-align: center;">V&iacute;nculo</th> 
          <th style="text-align: center;">Empresa</th> 
          <th style="text-align: center;">Sub contratada</th> 
          <th style="text-align: center;">NDP</th> 
          <th style="text-align: center;">CH</th> 
          <th style="text-align: center;">HHT</th> 
          <th style="text-align: center;">Ger&ecirc;ncia</th> 
          <th style="text-align: center;">&Aacute;rea Solicitante</th> 
          <th style="text-align: center;">CC</th> 
          <th style="text-align: center;">Rateio</th> 
         </tr> 
        </thead> 
       </table> 
      </div> 
      <div class="spacer"></div> 

     </body> 
    </html>  

Trả lời

8

Microsoft đã thừa nhận vấn đề như một lỗi trong IE10. Sự cố được đóng với trạng thái "Không khắc phục". https://connect.microsoft.com/IE/feedback/details/787208/ie10-waiting-for-domains-url-text-occasionally-gets-stuck-on-tabs-title-only-after-refreshing-it

Nó cũng là lỗi đã biết trong IE11.

+1

Có giải pháp nào để khắc phục không? – sunil

+0

@sunil Chỉ cần đặt một cái đã hoạt động cho tôi – Steve

5

Odd như nó có vẻ tôi quản lý để sửa chữa nó cho ie8 mà không rõ ràng gây ra bất kỳ thiệt hại cho Firefox hoặc Chrome bằng cách sử dụng này trong JavaScript

<script language="javascript"> 
    window.onfocus = function(){ 
    var title_var = document.title; 
    document.title = title_var; 
    } 
</script> 

Như Charly H gợi ý onload cũng có thể được sử dụng

<script language="javascript"> 
    window.onload = function(){ 
    var title_var = document.title; 
    document.title = title_var; 
    } 
</script> 
+2

Tôi biết bài đăng này đã được 1 tuổi rồi, nhưng đối với những người khác đang tìm kiếm bản sửa lỗi, hãy thay đổi window.onfocus thành window.onload là một giải pháp tốt hơn. Nhưng vẫn là một giải pháp tốt cho vấn đề này. –

+0

Đây là tập lệnh gốc đầy đủ trên bài đăng của notawizard. https://wordpress.org/support/topic/slider-glitch-after-clicking-on-other-browser-tabs Đối với phần này bạn có lẽ đúng, onload sẽ tốt hơn. Thật ngạc nhiên là nó vẫn chưa được sửa trong Edge. (notawizard là tôi trên WordPress) – Steve

+0

Thử nghiệm thêm cho thấy rằng 'onfocus()' đáng tin cậy hơn khi các tab được bật, nó kích hoạt sự kiện 'onfocus()' nhưng không nhất thiết là sự kiện 'onload()'. – Steve