Yahoo Military notes (website optimization)

Source: Internet
Author: User
Tags website performance

Yahoo Military (website optimization tips)

1. Reduce the number of HTTP requests as much as possible.

HTTP request: A request message from the client to the server. Includes the first line of the message, the resource's request method, the resource identifier, and the protocol used.

2. Using a CDN (Content distribution Network)

CDN Network: Content distribution network. As far as possible to avoid the internet has the potential to affect the speed and stability of data transmission bottlenecks and links, so that content transmission faster and more stable.

That is, in the most recent place where users put a good performance link smooth copy server, so that you can at the nearest distance, the fastest speed to get content.

3. Add Expire/cache-control Header

Expire module: The content of the expire header is a time value, the value is the local expiration time of the resource, exists locally. In the local cache phase, a corresponding resource value is found, and the current time has not exceeded the resource's expiration time, which is used directly and does not send an HTTP request.

Cache-control is one of the commonly used headers in the HTTP protocol, as the name implies, he is responsible for controlling the caching mechanism of the page, if the head indicates buffering, the buffered content will also exist locally, the operation flow and expire similar, but there are different places, Cache-control has more options, and there are more ways to handle it.

4. Enable gzip compression

Configure on the server side.

5. Place CSS on top of the page

Renders the style directly, avoids the first content causes the page to be confused.

6. Place the script at the bottom of the page

Prioritize content, and avoid script scripts that cause page display to slow down, even into a dead loop.

7. Avoid using expressions in CSS

Cssexpressions: That is, the CSS expression, you can not use this expression is because cssexpressions in the mouse movement every moment in the calculation.

8. Put both JavaScript and CSS in an external file.

It is necessary to dialectically look at the advantages of external and internal documents :

Extracted separately: Improve the reusability of JS and CSS, reduce page volume, improve the maintainability of JS and CSS.

Write in the page: Reduce page requests, improve page rendering speed.

So when a page is applied to only one page, infrequently accessed, scripts or styles are rarely written in the page.


9. Reduce DNS Queries

Remove unnecessary whitespace characters, formatting characters, and annotation characters.

Abbreviated method name, parameter name Compression JS script.

10. Compress JavaScript and CSS.

At the moment of official launch, both JavaScript and CSS are compressed, making the online version the most lightweight and dramatically improving website performance.

11. Avoid redirects.


12. Remove the duplicate script.


13. Configure the Entity label (ETAG)

The entity tag is an identity or tag, the server sends a request to the client, the client responds, and the etag is found to use the previous buffer directly.

14. Make the AJAX cache

The main function of Ajax buffering is local buffering. You do not have to reload all the pages at a time.


15.Yslow Website Performance Optimization Tool

Learn to use YSlow to get more optimization tips or suggestions.







Yahoo Military notes (website optimization)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.