Jeff Beck
Jeff Beck

Reputation: 3938

Detect if Address Bar is Showing in iOS

On a webpage viewed on an iOS device I would like to use JavaScript to detect if the address bar is currently showing. Or if I could detect if the page was launched from the home screen or not.

The main goal I have is to add instructions how to add to the home screen if they didn't launch the page from there then hide the instructions otherwise.

Upvotes: 4

Views: 3543

Answers (1)

Jeff Beck
Jeff Beck

Reputation: 3938

I found the answer you can check against "window.navigator.standalone" for iOS to see if the user has the app loaded in full screen mode.

More info here.

Upvotes: 3

Related Questions