views:

88

answers:

2

I am developing a web app for iphone which requires the application to check for changes in a text file, and as soon as a change is detected, to complete certain actions.

The text file changes around once every 3 but the change has to be detected almost instantly and so I'm currently doing an ajax refresh every second.

This works perfectly on a desktop browser with no visible refresh noticeable, however on the iphone the activity spinner is practically constant.

Can this be suppressed? Or stopped?

N.B I'm currently using the jquery framework for ajax!

+1  A: 

No, using the xmlhttprequest object (jquery is based on this object) is going to envoke http traffic, which will cause the spinner to load.

Try polling a little less often and see if it stops.

Also you could try using websockets, however i'm not sure if this would still affect the spinner.

http://lukeredpath.co.uk/blog/pushing-events-to-your-iphone-using-websockets-and-pusher.html

Sidenote: the spinner is there to inform your users that they're requesting traffic, imo trying to block this user feed back is bad ux.

Ben Rowe
A: 

You can't. That spinner is "warning" the user that bandwidth is being used.

jpmartineau