Re: html and css code bloat
"Florian Schulze" <[email protected]> Mon, 31 May 2004 21:21:06 +0200
| Newsgroups | gmane.comp.web.zope.plone.devel,gmane.comp.web.zope.plone.design |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 31 May 2004 10:27:01 -0400, Chad Whitacre <[email protected]> wrote: >> The html part is not really problem if you use Apache to pack the data >> before sending it to the browser. The size difference when packed is >> minimal. But most of the configurations I found don't pack css and js. >> Does this have a reason? Could someone give me pointers which explain >> why this is done? Do browsers have bugs when getting compressed css or >> js? I can't believe this is a problem, because this all happens in the >> http protocol. > > Good point. Here's the numbers for plone.org: > > original compacted compressed both > -------------------------------------------------- > html 37 24 9 7 > css 27 19 6 4 > > > As far as compacting goes, I found mod_mocrify, but it's pretty rough: > http://mocrify.netandweb.de. Using an Apache module would be faster than > Zope and would benefit/involve a wider audience, but if you did use > compacting, you would want it to happen before caching. So an Apache > solution would make the most sense if you do your caching in Squid > rather than Zope. > > But it looks like compacting is only necessary when low bandwidth usage > is a really high priority. > > > > > chad You have to be carefull with removing comments from html and css. Some hacks in CSS work with special comment and char combinations. Also some comments in HTML contain <!-- [if IE5.5] --> or similar which is a feature of Internet Explorer to conditionally parse HTML in different IE versions. Florian ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click