How do I hide the address bar on iPhone?
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.
Is it possible to hide URL bar in iOS 9 (Safari browser) by using JavaScript?
For iPhone, you can make your content just one pixel higher than the viewport, that will eliminate the navbar.
Working code example: http://pastebin.com/16s8Xvbw
Caveats:
- Only works in landscape, and when flipping from portrait to landscape - if user enters the page in landscape, he/she must flip to portrait and back to landscape.
- If the user touches near top / bottom, navbar will re-appear.
- Does not work on iPad at all.
Is it possible to hide the address bar in iOS 7 Safari?
It does not work anymore. Here is a very detailed article around the changes in IOS7
Related Topics
How to Disable Print-Screen Functionality for a Webpage in All Browsers
How to Include External JavaScript Library in Reactjs
How to Apply the Length Condition on the Existing Regular Expression
How to Load All the Images from One of My Folder into My Web Page, Using Jquery/Javascript
How to Import File from Public Folder in React Application
Converting String Date in React/Javascript
Javascript: Replace Last Occurrence of Text in a String
Dynamically Add Variable Name Value Pairs to Json Object
Check If a Number Has a Decimal Place/Is a Whole Number
Save Embedded Pdf from Website
Wait for Http Request in Angular
Remove Whitespace Inside Json Object Key Value Pair
Break the Loop of an Array Looping Function (Map, Foreach, etc.)
React Router - Stay At the Same Page After Refresh
How to Format Base64 Encoded String While Sending in Json
How to Detect Browser Back Button Click Event Using Angular