2

I have a mobile website, I want to stop the address bar popping down when a user clicks on a link in my site in mobile safari e.g.

On: example.org/foo

click on a link, goes to: example.org/bar

NOTE: The URL address is updated using the history pushstate API so a new page isn't being loaded, only the URL is being updated.

currently the address bar pops down as the page changes. In the mobile Twitter app, as you click around and change the page the address bar does not pop down, even though they are also updating the URL.

Any ideas how to stop the address from showing during a page change (not after the page has loaded, which is what all the other links I found refer to).

Thanks.

Mark D
  • 526
  • 6
  • 10

4 Answers4

6

While this is not a solution to your problem, I can explain how mobile Twitter accomplishes this because I've had to look into it for a responsive website that I built.

Mobile Twitter does not use links at all. Instead they bind events to other elements (in this case <li> elements) which change what is displayed and are using HTML5 push state to update the URL bar.

Therefore, only solution I can see is building a separate version for mobile if possible.


P.S. Also, the easiest way to check code on mobile-specific websites is using Safari and changing the User Agent under the Develop menu.

Paul Sham
  • 3,185
  • 2
  • 24
  • 31