The Guide to Building High-Performance Websites
1. The project triangle: time, quality, cost. Often 3 out of 2
2. The biggest overhead to run is the DOM , not javascript . Cool experiences are only used when determining improvements to the user experience, not for functional and usability flaws
3. 0.1 seconds: the limit of user operation
4. External introduction of Javascript files is better than inline
5. When looping, put the length setting outside the loop
6. Improve performance without cutting functionality. Image optimization is the easiest solution to accomplish
(1) Lossless compression after determining the number of colors, resolution, and clarity of the image
(2) 3 formats: JPEG , PNG , GIF
JPEG : Joint Photographic Experts Group
PNG : Portable Web Image
GIF : Graphics Interchange Format
7. Use less <iframe>
The benefit of Iframes : their document's content positioning is independent of its parent document
Cons: lower performance
Download in parallel with the main page
IDC : Internet Data Center