Search code examples
iphoneweb-applicationsmobile-safari

Can iPhone Safari be prevented from showing the navigation bar during an AJAX call?


I've got an iPhone web-app which I'd like to look as native as possible. I've used the scrolling trick to get rid of Safari's navigation, and taken away scrolling to prevent it from coming back; however, every time my app pulls an XHR, it shows the navigation again. Because users will need to use external links to get into the app, I cannot use a standalone bookmark. Is there any way to do the AJAX calls on the sneak?


Edit: I found that it was actually the fact that I'm using the hash method for AJAX history. It makes sense that the nav slides out temporarily, since I'm updating the URL. Thanks for your responses.


Solution

  • Yes, would be the short answer.

    Since my webapps don't show the navigation bar, I have to assume that you are doing something other than just the XHR call which causes the scroll. Share some code and maybe we can see it.

    For example, Night Sky and Border Gas both do XHR calls.