If it's feasible and more importantly, readable, combine some of your code
on one line. However, using the <cfsetting> tag helps greatly with white
space.

At the top of your template (or somewhere near there) put:

<cfsetting enablecfoutputonly="Yes">

And at the end of your template, put:

<cfsetting enablecfoutputonly="No">

This will eliminate the majority of your white space problems by not
rendering any white space that's not wrapped inside of a <cfoutput>. You may
need to insert a few more <cfoutput> tags in your page, but I think it's a
small price to pay for a smaller size file.

Hope that helps,

~Mark

-----Original Message-----
From: Brian Thornton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 12:55 PM
To: [EMAIL PROTECTED]
Subject: Re: CF 4.0.1 and whitespace


Put any if and or buts on one line...

-Brian


At 04:41 PM 8/3/2000 +0200, you wrote:
>Hi,
>
>I just noticed something unpleasant that i guessmost of you guys know
>already.
>
>I have created a message board with ColdFusion and the pages my application
>creates have very much whitespace in them. I checked the rendered html code
>and the page shrunk from 145 k to 80 k by just removing the empty lines and
>lines with just tabs on them.
>
>I heard somewhere that ColdFusion 4.5.1 strips whitespace by itself. Is
that
>true? Are the any other best practices to get around this problem? I use CF
>server 4.0.1
>
>Best regards
>Tage Widsell
>Webmaster
>Propellerhead Software
>
>---------------------------------------------------------------------------
---
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
Brian Thornton
The Internet Design Firm
910 16th Street #810
Denver, CO 80202
phone. 303.893.6628
[EMAIL PROTECTED]
www.tidf.com

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to