Is this a really big improvement on a webpage to minimize HTML, PHP or CSS files, or does it not really matter?

I saw this HTML minifier in Ajaxian, and it made me wonder if this is really a really big improvement on a web page to minimize HTML, PHP or CSS files, or does it not really matter? (provided that they average 100 lines)

+6
html css php minimize
source share
6 answers

In fact, on 100 lines, about 80% of your total time to get the file will be network connections - minimizing them will practically not change. Typically, you want to reduce the total number of connections that you must complete for this page. Also, if possible, put your JS downloads at the end of the main page, because they need to be parsed in order, and everything else stops when this happens.

+5
source share

Minimizing is one of the tools of your toolkit, but to determine if it is suitable, it is best to profile with a tool such as YSlow . Naturally, the priority proposals of such an instrument will have priority.

+3
source share

I would doubt that minimizing a 100-line HTML or CSS file would make any difference.

I would never shrink a PHP file.

+2
source share

This can be significant if your server is under heavy load. Otherwise, no.

+1
source share

Best practice is that large websites use CDN (Content Delivery Network) for JS, CSS, image, and possibly static HTML files. These CDNs charge for bandwidth usage, so you want your files as small as possible to manage your expenses.

+1
source share

Minimizing the PHP file does not make much sense. However, it is important to minimize the HTML generated by your PHP script.

0
source share

All Articles