Chrome's loading indicator keeps spinning during XMLHttpRequest

后端 未结 4 1998
别那么骄傲
别那么骄傲 2020-12-13 06:56

I\'m writing an AJAX web app that uses Comet/Long Polling to keep the web page up to date, and I noticed in Chrome, it treats the page as if it\'s always loading (icon for t

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 07:20

    Sorry for my general answer, but if you want to have a program which are more browser independent you should use jQuery or other your favorite library instead of low level XMLHttpRequest and ActiveXObject("Microsoft.XMLHTTP").

    EDITED: I create two very simple HTML files: test.htm and load.htm and placed there in the same directory on a web site (try this one URL http://www.ok-soft-gmbh.com/jQuery/load/load.htm). I can't see effect which you describes in you question. Compare this files with your examples and you will solve your problem.

    load.htm:

    
    
    
      Demonstration of the jQery.load problem
      
      
      
    
    
    
      

    test.htm:

    OK!
    

提交回复
热议问题