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

本秂侑毒 提交于 2019-12-08 10:19:39

问题


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 that? this is for a website I am making that is supposedly compatible for the iPad.


回答1:


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).




回答2:


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



来源:https://stackoverflow.com/questions/7021339/making-a-website-for-the-ipad-removing-the-browser-after-adding-to-homescreen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!