Chrome loading indicator

68 views
Skip to first unread message

Andrey

unread,
Dec 11, 2009, 11:44:58 AM12/11/09
to Google Web Toolkit
Hello!

I am using comet (server push) in my application. When user logs in a
secondary connection being created. It is an ordinary GWT RPC call
with 50 sec timeout and retry.

Everything is OK except that Chrome and the Chrome only shows loading
indicator as if the page is loading.
How can I get rid of it?

Thanks in advance!

Andrey

unread,
Dec 18, 2009, 7:31:19 AM12/18/09
to Google Web Toolkit
I found the solutuion.
Chrome shows the loading indicator if connection was made immediately
from the "body onload()", i.e. from onModuleLoad().
Do not connect to the server immediately but schedule a timer and
connect after a second or more.
This works for me:

Timer timer = new Timer() {
@Override
public void run() {
connect(sessionId, cometCallback);
}
};
timer.schedule(1000);

It seems that the pause shouldn't be too small. 1 sec seems to be
enough, but it should be checked on slow machines too.

Reply all
Reply to author
Forward
0 new messages