Chantal
Chantal

Reputation: 41

Is it possible to hide the address bar in Safari on iPhone?

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!

Upvotes: 3

Views: 10962

Answers (2)

Mac_W
Mac_W

Reputation: 2987

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?

Upvotes: 0

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.

Upvotes: 1

Related Questions