IPhone 5s - iOS 9.0.2 - Safari - Hide the address bar in landscape mode

Is there a way to remove the safari address bar in iOS 9.0.2 ?

I tried to do something to hide the address bar, but failed.

1. added metatag.

 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> 

2. Added JS code.

  window.addEventListener("load",function() { // Set a timeout... setTimeout(function(){ // Hide the address bar! window.scrollTo(0, 1); }, 0); }); 

But no success. can anyone help me with this?

+5
source share
1 answer

The only way I know is to use your site as a web application. You should add the following to your title:

Add it for iOS

 <meta name="apple-touch-fullscreen" content="yes"> 

and for android

 <meta name="mobile-web-app-capable" content="yes"> 

after adding your website to the main screen. It will create an icon on the screen of your iPhone, and when you click on it, the application will start in full screen mode without an address bar

Update 2019:

This may not be relevant, please consider the Progressive Web App

https://developers.google.com/web/progressive-web-apps/

+1
source

Source: https://habr.com/ru/post/1234596/


All Articles