Page 1 of 1
HTML compress
Posted: Sat Sep 02, 2006 1:19 pm
by biancospino
Hi all, this is my first post on this forum.
Excuse my poor english, I'm italian and I'm studing your language (with bad results).
My Serendipity blog is online with a Carl Galloway's template modified by me.
Recently I found an HTML compress freeware tool capable of removing unecessary characters from HTML to speed up our blog
http://www.freesoft.fsnet.co.uk/html01.htm.
Maybe this tool can be used on a Serendipity template to reduce its size...I will investigate.
ciao
Re: HTML compress
Posted: Sat Sep 02, 2006 1:33 pm
by garvinhicking
Hi!
Your english sounds absolutely perfect and understandable.
Thanks for telling us about the HTML compressor. But actually this has some issues; replacing strings in a document is a CPU-intense replacement. If you parse a 200kb HTML output through the replacement tool and might be able to put it into 150kb, this will take up some CPU cycles.
Usually, the CPU of a webserver is the limiting factor, not the bandwidth it consumes. That means, CPU power is less cheap than bandwidth, so most templates are optimized for performance, and not for size.
Webservers are often able to use the "GZIP" on-the-fly encoding, which is even better than just blank-space removal of HTML - it can reduce the size from 200kb to 20kb. Serendipity supports that option as well, if your webserver is capable of that. But you should only enable it, if the CPU is not running at its limits.
There are easy Smarty postfilters that do the whitespace removal, which could be easily implemented into a serendipity blog; but because of the reasons above I must admit I'm not really for doing this.
Many thanks for getting involved in Serendipity! I hope you have fun blogging!
Best regards,
Garvin
Posted: Sat Sep 02, 2006 1:43 pm
by biancospino
Thanks a lot Garvin
What about of using this tool on the template files before uploading them on the webserver?
I will try and post results.
ciao
Posted: Sat Sep 02, 2006 1:47 pm
by garvinhicking
Hi!
You could do that, but then editing a template would get very hard because of the missing formatting! But if you do not intend to edit a template, you could upload it on your own with that modification; this should properly work.
However we can't offer those templates for the usual official download, because there it is much more important to be able to edit/read a template, instead of saving a few bits.
Best regards,
Garvin
Posted: Sat Sep 02, 2006 7:39 pm
by carl_galloway
I've tried removing whitespace and also reducing the length of stylenames (serendipity to s9y ) etc and found that as Garvin says, the template does seem to be very slightly faster but impossible to change. I regularly change small things in the template on my site and it becomes a pain in the @ss.
In the end I went with Garvin's solution of using gzip on the fly, and I gotta tell you this is way faster, and I don't have to worry about reading my template files.
Posted: Sun Sep 03, 2006 10:47 am
by biancospino
Interesting. Thanks a lot Carl, also for your templates!
ciao