Skip to content
Advertisement

How do I hide the address bar on iPhone?

How do I hide the address bar on iPhone?

I tried two different methods so far:

  • The scroll down one pixel trick with JavaScript on page load

  • And the following meta tags:

    JavaScript

Also this:

JavaScript

I am completely confused.

PS: Oh, I forgot a really important thing: the web page itself does not overflow the browser window. It probably is the reason why the 1 pixel scrolldown trick does not work.

I can’t make it bigger, since the hit thing about the design, that everyone can scroll, but this page folds… 🙂

Advertisement

Answer

I just hit this myself. If the address bar is not hiding, the reason may simply be the page is not long enough to scroll.

When the

JavaScript

is called the page MUST be longer than the window so a scrolling event can occur.

Only when the scrolling even occurs will mobile safari hide the address bar.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement