Checks whether IOS Web applications are running in full screen mode.

Source: Internet
Author: User
Tags home screen

The Safari browser on iOS enables the web application to be displayed in full screen to achieve a display effect similar to that of a local application. However, this requires you to add the web application icon to the home screen. As a developer, we may want our web application to prompt users to add the web application icon to the home screen when it is running in a non-full screen state for better display.

To check whether the web application is currently running in full screen mode, you only need to check the window. navigator. whether standalone is true or not. If this attribute is true, the Web application is currently running in full screen state; otherwise, the Web application is running in non-full screen state. When detecting that the Web application is running in a non-full screen state, you can be prompted to add the web application icon to the home screen.

Running effect:

Related Article

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.