Mobile phone white screen front-end optimization method, more than 5 kinds of

Source: Internet
Author: User

Mobile phone white screen is mainly due to page rendering blocking, resulting in the following reasons:

1:css file loading takes a certain amount of time and the page is blank during loading

Workaround: Use the CSS code in front of or inline with HTML <style>

2. May be waiting for the asynchronous loading of data to render the page results in a white screen, large data load slow, resulting in data not requested to block page rendering

Resolution: Synchronously renders the page when the phone is displayed on the first screen, followed by an asynchronous request to render the page when the page scrolls (sliding)

3. The execution of the first screen JS of the mobile page will block the rendering of the page.

Workaround: Try not to place inline scripts in the first-screen HTML code. i.e.: Do not use <script></script>

Note: The first screen: the user can see the first page, the other pages can be displayed by sliding scroll bar.

Mobile phone white screen front-end optimization method, more than 5 kinds of

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.