简体   繁体   中英

Check if page added To iPhone homescreen

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM