One UDF I've found very helpful in removing whitespace is HtmlCompressFormat from the cflib project:
>From the website: -- This function is useful to reduce download time of your entire webpage. Client's will load pages noticably faster. Also very useful to compress a page before caching it for storage. Code is very useful in the fusebox 3 methodology, wrap this around your #fusebox.layout# variable to compress the html output. Code works on 3 levels of compression, and can easily be customized for more or different ways. Level 1: Replaces excessive spaces with no side effects. Level 2: (default) Removes more blank space but keeps html tags from wrapping into each other, so the code is still readable (maybe even more so) Level 3: Replaces all comments and any spaces possible, the side effect is space between html tags is removed, so alignment changes are possible. -- http://www.cflib.org/udf.cfm?ID=812 It can really crunch down pages to much more manageable sizes. Regards, larry > -----Original Message----- > From: Haikal Saadh [mailto:[EMAIL PROTECTED] > Sent: Friday, July 08, 2005 1:14 AM > To: [email protected] > Subject: Whitespace (was: Re: [CFCDev] LINT like tools for > coldfusion?) > > > (Sorry... seems like our mail system has been chewing up > messages from > cfcdev... I was just reading the thread archive on the web) > > Whitespace can get to be major problem. We have gotten a huge > performance gain, by turning on enablecfoutputonly. > The ratio of whitespace to content was so bad, (Big CMS system) that > most of the page was whitespace. Once we cleaned that up, users spend > less time downloading whitespace, and our network had more > capacity to > to serve real content (rather than whitespace). The effect it had on > load, and user response times was significant. > > > > > >On 6/14/05, Peter H <[EMAIL PROTECTED]> wrote: > >> I think the premise is that if you cfoutput the whole > page, the whole > >> page has to be parsed where as if you cfoutput selected > parts there is less work > >> for the page processor to do. > > > >Since the whole page is compiled ONCE and then just > executed, I'm not > >sure what you mean. Perhaps it was true in CF5 but that argument > >doesn't really make sense with CFMX. > > > >> I tried this today for a reasonably complex page to see it > would make > >> a difference. Initial findings are that it did but the difference > >> wasn't big. > > > >One thing that *might* be different is the generated > whitespace. If you > >have <cfoutput> only around stuff you want in the HTML stream, then > >CFMX will generate less whitespace and that might lead to some minor > >performance differences... > >-- > >Sean A Corfield -- http://corfield.org/ > >Team Fusebox -- http://fusebox.org/ > >Got Gmail? -- I have 50, yes 50, invites to give away! > > > >"If you're not annoying somebody, you're not really alive." > >-- Margaret Atwood > > > > > >---------------------------------------------------------- > > > > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [email protected] with the words 'unsubscribe cfcdev' as > the subject of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by > CFXHosting (www.cfxhosting.com). > > CFCDev is supported by New Atlanta, makers of BlueDragon > http://www.newatlanta.com/products/bluedragon/> index.cfm > > An > archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > This electronic communication, together with any attachments, may contain information that is legally privileged, confidential or otherwise private. The information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this communication or any attachment is strictly prohibited. If you have received this communication in error, please immediately notify the original sender and delete the received information from your system. Thank you. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
