Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it really a big improvement for a webpage to minimize HTML, PHP or CSS files or it doesn't make any big difference?

I saw this HTML minifier in Ajaxian and it made me wonder if its really a big improvement for webpage to minimize HTML, PHP or CSS files or it doesn't make any big difference? (assuming that they are 100 lines long in average)

like image 556
alexchenco Avatar asked Mar 11 '10 01:03

alexchenco


People also ask

Which is best PHP or CSS?

CSS represents the style and the appearance of content like font, color, margin, padding, etc. PHP is used for server-side programming which will interact with databases to retrieve information, storing, email sending, and provides content to HTML pages to display on the screen.

Does CSS slow down website?

Since CSS is render-blocking, loading all the CSS for every visitor on every page will often produce slower website speeds.

How do I compress HTML and CSS?

Go to minifycode.com and click the CSS minifier tab. Then paste the CSS code into the input box and click the Minify CSS button. After the new minified code is generated, copy the code. Then go back to the css file of your website and replace the code with the new minified version.


1 Answers

Actually, at 100 lines long about 80% of your total to time to get the file will be network connections -- minifying them will make next to no difference at all. As a general rule you want to reduce the total number of connections you have to make for a given page. Also, when possible, put your JS downloads at the end of the main page because they have to be parsed in order and everything else stops while that happens.

like image 120
Peter Rowell Avatar answered Oct 06 '22 00:10

Peter Rowell