In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
How can website performance be optimized? Many novices are not very clear about this. In order to help you solve this problem, the following small series will explain it in detail for everyone. Those who have this need can come to learn. I hope you can gain something.
Website performance optimization includes: 1. content, reduce HTTP requests, reduce DNS queries, avoid redirection;2. Server, use CDN, use Gzip compression, avoid empty src img tag;3. cookie, reduce cookies.
1. Content aspects
Reduce HTTP requests: merge files, CSS sprites, inline images
Reduce DNS queries: Browsers cannot download any files from this host until DNS queries are complete. Methods: DNS caching, distributing resources to the right number of host names, balancing parallel downloads and DNS queries.
Avoid redirects: redundant intermediate visits
Using AJAX caching
non-essential component delay loading
Future Required Component Preloading
Reduce the number of DOM elements
Placing resources under different domains: Browsers can download a limited number of resources from a domain at the same time, increasing the number of domains can increase parallel downloads
Reduce the number of iframes
No, 404.
2. Server aspects
using a CDN
Add Expires or Cache-Control: Cache-Control overrides Expires when both Cache-Control and Expires exist. related links
Use Gzip compression
Configure Etag
Flush Buffer Early
Ajax uses GET to make requests
Avoid empty src img tags
3. Cookie
Reduce cookies
Domain names that import resources do not contain cookies
4. CSS aspects
Place style sheet on top
Do not use CSS expressions
Do not use @import
Do not use IE filters
5、JavaScript
Place the script at the bottom of the page
Introducing JavaScript and CSS from the outside
Compressing JavaScript and CSS
Delete unwanted scripts
Reduce DOM queries
Design Event Listeners Properly
6. Picture
Optimize the picture: according to the actual color needs to choose color depth, compression
Optimize CSS sprites
Do not stretch images in HTML
Keep favicon, ico small and cacheable
7. Mobile aspects
Guaranteed component less than 25K
Pack Components into a Multipart Document
Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.