Web App Technical Reference--from "Baidu Mobile building Station Guide"

Source: Internet
Author: User

Optimize page performance Considering the characteristics of mobile devices and mobile Internet, a general principle is to consider the efficiency of user access in the design of mobile Web page development.reduce page load time。 The following content comes from Baidu, and then I made my own notes. You can also refer to this series of articles. Reduce the number of access requests
    • Simplify the page from the design implementation level, don't put too many pictures, complex expressions, animations, videos and so on.
This is a good understanding that binary data accounts for too much traffic.

    • Resource merging and compression: for example, background images, navigation pictures, and so on as a picture, so that only one request, not multiple times.
resources are merged, and only one request is used to resolve the problem. Compression, is to reduce the file size, such as css,js to blank.
As for compression, the content involved is more complicated: refer to " speeding up the transmission of Web data with HTTP compression ", "Configuring Tomcat,apache gzip Compression (HTTP compression) to improve browsing speed" "http" Fiddler (i) -Brief introduction of Fiddler

    • Static resources (CSS, Js, Image) Lazy loading

Refer to this article "Let's talk about browser resource loading optimization"

    • Asynchronously executes an inline script

Do not understand, the net things are not much, follow-up.

    • Avoid duplicate resource requests

The most common is that jquery has been quoted several times.

    • Reduce cooike

Why is it? Is broadband too much, or is it a drain on resources?

    • Set the connection mode to Keep-alive

"Talking about the keepalive of HTTP"

    • Reduce DNS queries

Optimize website Design (ix): Reduce the number of DNS lookups

    • The visible area of the mobile is limited, using the lazy loading mode

What is the difference between "lazy loading" of static resources (CSS, Js, Image) above?

    • Turn on server compression (gzip mode)
It's
been said, it's a little superfluous.
Optimize picture processing
    1. Picture Walk CDN
    2. Use less animated GIF images
    3. The picture is inappropriate and too large.
    4. Fragmented images using CSS Sprite technology one-time download
    5. Avoid using BMP images
    6. Image compression
1. Ask for money. 2.3.5.6 can be used in the background to control the image upload specifications
Optimize HTML
    1. Reduce unnecessary nesting by reducing HTML tags
    2. Discard Table Label
    3. Reduce DOM Depth
    4. Compress HTML, remove comments , wrap spaces, and more
think of Miss Nguyen's " Maybe, DOM is not the answer "
Optimized JS
    1. caution with syntax
    2. using AJAX caching
    3. avoid eval and function syntax
    4. avoid using inlinescript
    5. async, bottom-loaded JS
    6. merge compression js
    7. string join using array Join method

This knowledge is not RIPE!!!

Web App Technical Reference--from "Baidu Mobile building Station Guide"

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.