-
content
- Reduce HTTP requests: merge files, CSS sprites, inline images
- Reduce DNS lookups: The browser cannot download any files from this host until the DNS lookup is complete. Approaches: DNS caching, distributing resources to the right number of hostnames, balancing parallel downloads and DNS queries
- Avoid redirects: redundant intermediate visits
- Make Ajax cacheable
- Lazy loading of optional components
- Preloading of future required components
- Reduce the number of DOM elements
- Put resources into different domains: The number of resources that browsers can download from a domain at the same time is limited, and increasing domains can increase the amount of parallel downloads
- Reduce the number of iframes
- don't 404
-
Server side
- Use a CDN
- Add Expires or Cache-Control response headers
- Use Gzip compression for components
- Configure ETag
- Flush Buffer Early
- Ajax requests using GET
- Avoid img tags with empty src
-
Cookies
- Reduce cookie size
- The domain name of the imported resource should not contain cookies
-
css aspect
- Put the style sheet at the top of the page
- Do not use CSS expressions
- Use without @import
- Do not use IE's Filter
-
Javascript side
- Put the script at the bottom of the page
- Import javascript and css from outside
- Compress javascript and css
- remove unnecessary scripts
- Reduce DOM access
- Reasonable design of event listeners
-
Pictures
- Optimize pictures: choose color depth and compression according to actual color needs
- Optimize css sprites
- Don't stretch images in HTML
- Keep favicon.ico small and cacheable
-
mobile
- Guaranteed components less than 25k
- Pack Components into a Multipart Document
How to optimize website performance
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324773419&siteId=291194637
Recommended
Ranking