Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
40
rated 0 times [  41] [ 1]  / answers: 1 / hits: 123634  / 14 Years ago, sun, november 7, 2010, 12:00:00

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:



    <meta name=viewport content=width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; /><meta name=apple-mobile-web-app-capable content=yes />



Also this:



<meta names=apple-mobile-web-app-status-bar-style content=black-translucent />


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... :)


More From » iphone

 Answers
67

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



window.scrollTo(0,1)


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.


[#95051] Thursday, November 4, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dominickmackenziet

Total Points: 583
Total Questions: 101
Total Answers: 117

Location: Saint Lucia
Member since Wed, Feb 8, 2023
1 Year ago
dominickmackenziet questions
Wed, Apr 7, 21, 00:00, 3 Years ago
Fri, Feb 12, 21, 00:00, 3 Years ago
;