Window.navigator.standalone detects if iOS WebApp is running in full screen mode

Source: Internet
Author: User

The Safari browser on iOS allows the Web application to display in full screen for similar local app display results. However, this will require the user to add the Web application's icon to the home screen. As a developer, for a better display, we may want to prompt the user to add the Web application's icon to the home screen when the Web application is running in a non-full-screen state.

To detect whether the Web application is currently running in full-screen state, just detect if Window.navigator.standalone is true, if this property is true, the Web application is currently running in full-screen state, otherwise it is running in a non-full-screen state. When a Web application is detected to run in a non-full-screen state, the user can be prompted to add the Web application's icon to the home screen.

Window.navigator.standalone detects if iOS WebApp is running in full screen mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.