How to optimize webpage download speed

Source: Internet
Author: User
Tags curl

How to optimize webpage download speed
The browser does not need to look at blank lines for parsing js and css. Press enter and tab. However, a js and css file are empty rows, and the conversion and TAB take up at least 15% of the size of a file. Its name is "indent. For example

Global. js
<Scirept>
Var a = 1;
If (){
Alert ();
}
</Script>

Let's minify it.

<Scirept> var a = 1; if (a) {alert (a) ;}</script>

Browser resolution is not affected at all ~~~ Load speed again ..
This reduces the volume. Similarly, css ...... I don't need to demonstrate it anymore.

Indentation is helpful to programmers. It is useless to browsers and takes up network speed and traffic. Therefore, we need to minify it ~~~ Reduce indentation and empty line spaces. Delete comments .. Why do you want minify? Go to Baidu and google homepage. It's not what people see at all ~~~


Do not ask me how to use it... You are a Cainiao and you do not need to be optimized...
Good luck.

Note that, although minify. fengyin. name supports directly entering the address to help you minify the file, the file is obtained based on curl. 5 Seconds of timeout, your js file address must be in the http status of 200 or curl will not bird you. This means that the address you entered cannot perform any jump or redirection, if you are in minify. fengyin. name: The url of the file is entered and the code content is entered in the box. After the file is submitted, the url address code is not the content you wrote in the box ~~~ This is a sequential problem ..

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.