Server push, jquery atmosphere and the throbber of doom
Posted in: English posts
I’m using the Atmosphere framework to implement server push (a.k.a. Comet) in a Spring 3 application.
Atmosphere includes a fine jQuery plugin to handle the client side code. The plugin works quite well and Jean-Francois, the author, has a good tutorial in his blog: Using Atmosphere’s JQuery Plug In to build applications supporting both Websocket and Comet.
The code works but causes webkit browsers (Chrome and Safari) to show the throbber (that little spinning thingy in tab or address bar). In iOS browsers that loading progress bar will not disappear.
I found some suggestions to get rid of the “throbber of doom” but none of them worked for me.
So here is my solution which is tested with jQuery 1.4.2 and jQuery.atmosphere 0.6.3:
So far i’ve tested this in Firefox 3.6, Chrome 8, Safari 5 and Internet Explorer 8 and had no problems.