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.
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"
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
- Picture Walk CDN
- Use less animated GIF images
- The picture is inappropriate and too large.
- Fragmented images using CSS Sprite technology one-time download
- Avoid using BMP images
- Image compression
1. Ask for money. 2.3.5.6 can be used in the background to control the image upload specifications
Optimize HTML
- Reduce unnecessary nesting by reducing HTML tags
- Discard Table Label
- Reduce DOM Depth
- Compress HTML, remove comments , wrap spaces, and more
think of Miss Nguyen's " Maybe, DOM is not the answer "
Optimized JS
-
- caution with syntax
- using AJAX caching
- avoid eval and function syntax
- avoid using inlinescript
- async, bottom-loaded JS
- merge compression js
- string join using array Join method
This knowledge is not RIPE!!!
Web App Technical Reference--from "Baidu Mobile building Station Guide"