2

Here's a problem Google can't answer. I'm doing some HTTP "long polling" with XMLHttpRequest for a multiplayer game. In Chrome, this causes the tab to always be "loading" : (1) the icon in the tab is constantly playing the loading animation (2) the cursor is constantly an hourglass (3) the status persists forever at the bottom of the view area saying "contacting localhost"

I was sure others have run into this, but I can't find them yet.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Brandon
  • 21
  • 1
  • 1
    possible duplicate of [Chrome's loading indicator keeps spinning during XMLHttpRequest](http://stackoverflow.com/questions/2703861/chromes-loading-indicator-keeps-spinning-during-xmlhttprequest) – David Hedlund Feb 21 '11 at 15:23

1 Answers1

9

Try starting the first long poll slightly after the page loads, rather than directly in the page load event (use a short timeout triggered on page load). It seems like you need to give Chrome a few milliseconds to regain it's composure so it doesn't constantly look like it's loading.

beeglebug
  • 3,522
  • 1
  • 23
  • 39