Greg's Blog

helping me remember what I figure out

Reducing Whitespace in CF

| Comments

A neat post showing how to use the underlying Java of COldFusion MX to supress the annoying whitespace that CF seems to generate. He also included this little tidbit of Code:

<!— no output except cfoutput —> <cfsetting enablecfoutputonly=”yes”> <!— all generation goes here —><cfoutput>#repeatstring(chr(10),5)##createuuid()#</cfoutput> <!— then we get all buffered output —> <cfset variables.allout = getPageContext().getCFOutput().getString()> <!— reset the content type and flush the buffer at the same time —> <cfcontent type=”text/html” reset=”yes”> <!— and output the trimmed version —> <cfoutput>#trim(variables.allout)#</cfoutput>