开发者

Making a website for the iPad, removing the browser after adding to homescreen?

开发者 https://www.devze.com 2023-03-27 00:06 出处:网络
I noticed that if you go on google chat, and \"add to home screen\", once you open it from home screen, the browser disappears and all you see is the website itself... I\'m wondering how google manage

I noticed that if you go on google chat, and "add to home screen", once you open it from home screen, the browser disappears and all you see is the website itself... I'm wondering how google managed to do t开发者_StackOverflow中文版hat? this is for a website I am making that is supposedly compatible for the iPad.


Add the following meta tag to the page's header:

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

The window.navigator.standalone boolean JavaScript property will indicate whether the page is currently displayed in full-screen mode (it will only be displayed full-screen if launched from a home screen icon, not if visited from within Safari).


To keep all links from 'breaking out' of the full-screen mode, see this

0

精彩评论

暂无评论...
验证码 换一张
取 消