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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing White Space

Status
Not open for further replies.

TamedTech

IS-IT--Management
May 3, 2005
998
GB
Hello Guys,

Just a quick one, i've just taken a look at the source code for the new MSN site and noticed how MS have corpressed the entire source into one lump.

What are the benefits to this? simply a minute improvment to loading times?

Also, how might this be achieved using CF?

Ta,

Rob
 
benefits? somewhere between nil and non-existent

how can you do the same? simply don't use the Enter key when coding, which will put everything onto one long line

r937.com | rudy.ca
 
You can turn on whitespace compression in Admin , but it doesn't get rid of all of it.

MS runs their sites through a utility that removes all spaces ebetered uring coding. It's supposed to help with copying code, but it really doesn't ... it just makes it a little tougher to find the required code.
 
Ok thanks guys,

I had suspected that it wouldn't have any practical benefits, I've just seen it used quite alot by MS and thought maybe there was some logic behind it.

Ta,

Rob
 
What are the benefits to this? simply a minute improvment to loading times?

What might seem like a small loading time increase can make a huge difference, especially on a site that gets the amount of hits that MSN does.

by the way, there is a cf tag for this

All that does is removes excess whitespace from content that CFML tags generate, it doesn't do the same as MSN have done.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting
YetiHost - Coming Soon

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Wullie - I agree. Take what, 50,100 CR /LF (not to mention extra spaces and tabs that could linger at the end of a line) and multiply by millions a day... it adds up fast.


Kevin

Phase 1: Read the CFML Reference
Phase 2: ???
Phase 3: Profit!
 
Stripping out all unneccesary whitespace and line breaks reduces the file size of your pages, which helps make them load faster and will save you money as bandwidth is reduced on page loads. For sites like MSN and Google, every little bit helps.

JAlpino
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top