最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Check if page added To iPhone homescreen - Stack Overflow

programmeradmin2浏览0评论

Is it possible to check using JavaScript or CSS if a page has been added to the iPhone homescreen in webapp mode. Like getting the height of the screen which wouldn't have the nav bar so would be 460px

Is it possible to check using JavaScript or CSS if a page has been added to the iPhone homescreen in webapp mode. Like getting the height of the screen which wouldn't have the nav bar so would be 460px

Share Improve this question edited Jul 14, 2012 at 6:57 ThinkingStiff 65.3k30 gold badges147 silver badges241 bronze badges asked Jan 28, 2011 at 16:36 Jonathan.Jonathan. 55.5k55 gold badges196 silver badges300 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 26

You're looking for window.navigator.standalone (mentioned by Apple here)

This won't tell you if the page has been added to the homescreen if it is being visited in the regular browser, but it will tell you if it has been launched from the homescreen.

发布评论

评论列表(0)

  1. 暂无评论