views:

145

answers:

1

I'm using the following for a long-polling request...

$.getJSON(url, function(data) {
     ...
});

The request won't finish until either 30 seconds have passed or there is information to send (long-polling).

The problem is that Firefox is the only browser that will display "Waiting for URL..." at the bottom. Is there any way to prevent this?

+1  A: 

This is pretty bad because some users will just sit there and wait for the page to 'load', and Firefox is not the only browser that does this. Unfortunately, I don't think there is an easy way to fix this without using some fairly exotic techniques. One thing you might try provided the duration is due to server processing time, not data transfer to the client, is using an psuedo-async call. When you get the request, kick off a new thread on the server and return a token, that will clear the message. Every 'x' seconds send the token back to the server to check to see if the request is completed. Just make sure whatever security/authentication methods you need for the current request are replicated on both ends of the async request.

Paul