Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using the Apple meta tag for full-screen web app

I'm trying to use the

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

tag to get iOS Safari to show a page without the browser stuff; at least, that's what I think it's supposed to do for me. (The Apple documentation doesn't go into extensive detail.)

So far, I can't get it to do anything. Here is a JSBin example. With or with out the <meta> tag, the page comes up on both an iPod Touch and an iPad 2 with the browser stuff at the top (and bottom on the little screen).

Is there something else that needs to happen in order to affect the browser? Or are my expectations of how it should work just incorrect? (Note that, via weinre, I've checked the "windows.navigator.standalone" flag, and it appears to be false.)

like image 542
Pointy Avatar asked Oct 04 '12 19:10

Pointy


People also ask

Which meta tags indicates that the web application runs in a full screen mode?

The <meta name="apple-mobile-web-app-capable"/> tag in HTML 5. For a mobile app, the apple-mobile-web-app-capable meta tag determines whether the application runs in web mode, with an address bar and navigation bar, or in full screen mode without them.

How do I make my web app full screen?

There are several ways that a user or developer can get a web app fullscreen. Request the browser go fullscreen in response to a user gesture. Install the app to the home screen. Fake it: auto-hide the address bar.

What is Apple Web App Meta?

Using the "apple-mobile-web-app-capable" meta tag in the head element of an HTML page, it informs the Apple iOS that the application can be installed to the users springboard so that it starts the Safari Mobile browser without a menu bar.


1 Answers

That only does what you want when the user adds a link to your app to their home screen.

A common approach for the in-browser case is to add a call to window.scroll(0,1) which will get the browser stuff off the top of the screen. (There is no way to clear the bottom stuff.)

Also, you might want a tag to say you do not want scaling:

<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, user-scalable=no, maximum-scale=1, minimum-scale=1" />
like image 185
Joshua Smith Avatar answered Sep 19 '22 06:09

Joshua Smith