Safari and Chrome on mobile devices both include a visible address bar when a page loads. As the body of the page scrolls, the URL bar minimises:
My project is based on React JS and I am trying to achieve this result on page load (So no user interaction needed, page needs to load with the URL bar minimised. My web-app is made of a single page and no scrolling is possible (Application similar to Google Maps).
What I have tried so far (on an iPhone X):
References: https://developers.google.com/web/fundamentals/native-hardware/fullscreen/
To get started enter “about:flags” into the Address Bar and hit Enter. Scroll down until you see the listing for Compact Navigation. Enable it and let the browser restart to gain access to the feature. Once the browser has restarted right click on one of the tabs and select Hide the toolbar from the Context Menu.
var winFeature = 'location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes'; window. open('Result. html','null',winFeature); In many solutions, just the location=no attribute can hide the address bar (in both IE & Chrome).
<meta name="apple-mobile-web-app-capable" content="yes">
If content is set to yes, the web application runs in full-screen mode. Source: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
<meta name="mobile-web-app-capable" content="yes">
It does the same thing as the above one but, this is for android and the above one is for ios.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With