Use Minify to optimize website performance _php Tutorials

Source: Internet
Author: User
minifyis an application developed using PHP5 to improve website performance by following some of Yahoo's optimization rules. It merges multiple CSS or JavaScript files, removes unnecessary spaces and comments, makes gzip compression, and sets the browser's cache header. Minify is designed to resemble Yahoo's Combo Handler service, but minify can merge any JavaScript and CSS files you want to merge.

In general, site speed bottlenecks are in the front, and the most critical is the load speed of resources, but most browsers have a single domain number of concurrent requests limit, so if there is a lot of resources in a page, such as CSS and JavaScript files, it will obviously reduce the loading speed of the site, The better way is to access multiple files through a single request, which will not affect the previous file maintenance, but also reduce the clear amount of resources, Minify is born.

The following two images are a comparison of the site request time before enabling minify and after enabling Minify, and you can see that after enabling Minify, the load time of the resource is reduced from 250ms to 125ms, saving a total of 50% of the time.


http://www.bkjia.com/PHPjc/445823.html www.bkjia.com true http://www.bkjia.com/PHPjc/445823.html techarticle Minify is an application developed with PHP5 that improves website performance by following some of Yahoo's optimization rules. It merges multiple CSS or JavaScript files, removing unnecessary spaces and notes ...

  • 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.