3

I saw that it was impossible in iOS7 but now with iOS9. Is it possible to hide the address bar with javascript?

I want to do this for the iPhone and iPad users.

Thanks!

Chantal
  • 41
  • 1
  • 1
  • 2

2 Answers2

1

You can declare display mode in Web App Manifest.

"display": "standalone"

The application will look and feel like a standalone application. This can include the application having a different window, its own icon in the application launcher, etc. In this mode, the user agent will exclude UI elements for controlling navigation, but can include other UI elements such as a status bar.

The only gotcha is that user has to add your web app to homescreen first.

0

Is this for you are looking for? http://pastebin.com/16s8Xvbw

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
<style>
body { height: 100vh; padding: 0; margin: 0; }
div.content { height: 100%; }
div.spacer { height: 1px; }
</style>

Stackoverflow uestion: Is it possible to hide URL bar in iOS 9 (Safari browser) by using JavaScript?

Community
  • 1
  • 1
Mac_W
  • 2,927
  • 6
  • 17
  • 30
  • Seem not a perfect solution, because 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. – Franck May 17 '16 at 13:15