Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tightening up codes

Status
Not open for further replies.

minli98

IS-IT--Management
Aug 30, 2005
178
US
Hi,

Is there a program that can tighten up my codes so that all the white spaces and carriage returns are rid of?

Code:
      <cfif x gt y>
           <cfset x = x+1>
      </cfif>

becomes
<cfif x gt y><cfset x=x+1></cfif>

Of course this makes it more difficult to read, so I would ideally run the program just before uploading to the server.

Btw, I have already tried and used <cfsilent> and <cfsetting> and they do cut down the amount of white spaces somewhat (not entirely).

Thank you all.

Min
 
To make my files smaller -- faster download. To be honest, I don't know how big of a difference it's going to make, but that's why I want to try it.
 
Hey min,

Removing even a few hundred character returns from a page of CF isn't going to make a noticable difference to teh download speed - not for anyone on broardband anyway.

I suggest you add gzip compression to your cf application server, that will give you 70%+ smaller cfm files, and it adds almost nothing to the CPU load.

All browsers you can name support it.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top