Tim Blair
Modifying Page Generated Content (15/03/2004)
A post on MossyBlog was f-ing and blinding about whitespace appearing where it wasn't at all welcome. I've had the same issue before so I thought why not just see if there's a way to trim everything down before sending to the browser? As you generate content through your page, the data must be stored somewhere, so how to get at it?
The answer: using the good old underlying java of CF (therefore there are no guarantees with this!). By accessing the output buffer you can get a copy of the information stored in it, clear it, modify the content somehow (replacing variables, getting rid of white space etc) and then simply send it back to the output buffer with <cfoutput>...
Have a look at this to see what I mean:
Article Archive (September '03 – '05)
- Private CFC Methods and "this" 01/09/2003
- Active Sessions Across CF Applications 12/09/2003
- isnumeric() - Too Clever for It's Own Good? 15/03/2004
- Modifying Page Generated Content 15/03/2004
- CF and Arrays of Basic Java Types 17/03/2004
- Writing UTF-8 Text Files with ColdFusion 13/05/2004
- Top vs. Bottom Posting 09/07/2004
- Local (var) Scope Shortcut 27/12/2004
- Using Apache mod_headers to Change Downloaded Filenames 16/06/2005
- Changing the Working Directory of
<cfexecute>12/07/2005 - Flickr Workshop Review 29/09/2005