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
To see all your open apps in the App Switcher, do one of the following: On an iPhone with Face ID: Swipe up from the bottom of the screen, then pause in the center of the screen. On an iPhone with a Home button: Double-click the Home button.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With