Page 1 of 1
Posted: Fri Jan 21, 2011 6:23 am
Ive been looking into my making my website faster and was wondering if I should minify my html. Is this worth it? I guess what I really need to ask is how much speed improvement I can expect to gain from it. Some of my pages are pretty long with text and illustrations, but all in all pretty normal. What do I need to pay attention to in order not to mess things up? Thanks.
Re: HTML minification
Posted: Fri Jan 21, 2011 2:14 pm
I don't think I've ever gone the minify route with X/HTML.
It's ugly, harder to maintain and of limited benefit.
I don't know any details of your web site. I find a good fast server, compiling the programmed bits and good attention to code design can give lightning speed.
If it's just markup a good fast server still applies. (I've had ISP's move web sites to alternate shared machines to achieve this.)
Working on images is always a good idea and can make a difference. (Note: it's not always the same format that gives you best results, gif, png and jpeg all have their place in the sun.) I'd put that ahead of minification.
I know that some smart people set things up to compress the payload from the server. (gzip) There used to be some problems doing that but I believe it's now much better. I imagine that will also outperform minification.
For a discussion of this issue I found http://stackoverflow.com/questions/7282 ... nification
which gives additional hints, including tools that advise you on what to do.
Re: HTML minification
Posted: Fri Jan 21, 2011 2:28 pm
It's hard to help without a link to the site.
Just "compressing" the HTML to remove unnecessary space characters is probably a bad idea and won't help much... but there could other issues that could make a big difference, like large resolutions images that are 500K or larger that are set to display at 200x300 pixels or similar small size. They could easily be downsized and made much smaller in file-size. I've definitely seen that before.
Excessively long pages could also be divided into multiple pages.
Making sure there are no big structural issues in the HTML could also help increase rendering speed (check with a validator like CSE HTML Validator).
And of course what Mike said, a fast server is always good.