Frontend Optimization
Transmission Optimization
Transmission speed, transmission quantity, browser cache, pre-planting and delayed Loading
Transmission speed:
Byte optimization: HTML, JS, CSS, image, Flash, XML
CDN: breaks inter-operator restrictions (such as dnspod)
Reduce re-planting of the same file (for example, Microsoft Ajax CDN)
Use expression web to restore or optimize HTML Format
Transfer Quantity:
Reduce the number of file requests
Appropriate score reduction
Avoid Error 404 and redirection
Use multi-image integrated image files to plant a file in each room, and use CSS to load local files (good way)
Browser cache:
GET request files are easy to cache
CSS and JS are separated into external files (except for mobile clients)
Pre-loading and delayed Loading
Pre-Load
After the page is opened, the user immediately needs to see
JS and CSS that need to take effect immediately when opening the page
Delayed Loading
After opening the page, you must perform some actions to see
Estimated resources that users may want to access
Client Optimization
CSS
Avoid using IE filters and CSS expressions whenever possible (CPU will be high)
Try to putCodeFront
Minimize the use of small image repeat implementation background
JS
OptimizationAlgorithm(Especially loop)
Note: Long shaping is not supported.
There is no real multi-thread and needs to be simulated
Asynchronously load JS required for non-page Initialization
Html
Try not to use table layout, especially the peripheral layout.
Try to select applicable Div, P, and other streaming labels
Use semantic tags (strong, EM) whenever possible)
Reduce the number of Dom and IFRAME usage
Consider loading part of content Asynchronously
Ajax
Avoid concurrency
Try to use GET requests
Reference transmission optimization