Deleting whitespace: neccesary?

liunx

Guest
I read on <!-- m --><a class="postlink" href="http://www.websiteoptimization.com/">http://www.websiteoptimization.com/</a><!-- m --> that by deleting whitespace, you could acheive faster load times and less bandwidth use. I want to know if it really does affect it an actual amount, and if it does, is there a free program to do it with? Also, with PHP, would faster load times result if, saying there is a program, if I ran it on my scripts as well as my markup?<!--content-->well it makes the file slightly smaller since spaces and tabs and linebreaks are each a character of their own so taking out a page of linebreaks might save you a byte. technically you don't need any whitespace, but that's pretty hard to read<!--content-->a in white space in your code? I would leave indentions and spacing because it will make codeing easier for you. A few spaces is not going to hurt your load time much, if you use css that is going to help, and really your biggest concern should be server lag and image sizes, not a few extra spaces.<!--content-->Unless you just LOOOOOVE whitespace, I doubt you'll ever have enough to significantly increase load times.<!--content-->Oh, yes, I know, I'm no n00b in that respect, I indent the hell out of my code. What I meant was delete whitespace for the site's version, I'd still be modding my own code while it was indented.<br />
<br />
So, you guys are saying it absolutely won't effect load times more than a fraction of a second?<!--content-->on average yes that's right<!--content-->Alright, I'll take you people's word for it. Thanks... I guess I just worry too much.. then I don't know if I should worry.. so I post here ;)<!--content-->Actually white space does add significant size to pages, but Download <!--more--> time doesn't tend to get effect too much unless the file is large.<br />
<br />
Probably 1 byte is taken by white space so for each whitespace character you have, you lose a byte though if you care about your syntax underneath the page as much as you do on the source you'll probably indent your code like I do myself.<br />
<br />
1 kilobyte = 1024 bytes<!--content-->then we get to figure out the Download <!--more--> times, yippy. 1 byte = 8 bits. So it would take somone on a 56kilobit line .0001428 seconds to Download <!--more--> 8 bits or 1 byte.<!--content-->Alright, alright, you didn't have to bust out the figures on me, I'd take your word for it.<br />
<br />
And, yes, I do like my source to be readable. The only stuff I'm a little uneasy about linking people to is handled by PHP, so anything in my source is free to view, and seeing as I'd like my site to be a (albeit maybe somewhat poor :-\) example of accessible, valid, quality code styled with modern techniques. o.O<!--content-->you'd do better by combining tags and CSS<!--content-->Er..? What do you mean by that? I do use XHTML markup and CSS presentational if that is what you mean... ?<!--content-->Well, since you're all for semantics and validity and accessibility, then you should markup your list of links as a list. ;)<!--content-->Originally posted by Paul Jr <br />
Well, since you're all for semantics and validity and accessibility, then you should markup your list of links as a list. ;) <br />
<br />
I already did that a while ago... well a few hours ago, but oh well.<!--content-->Originally posted by omega <br />
I already did that a while ago... well a few hours ago, but oh well. <br />
I know. I read that post minutes after posting the above post... :o<!--content-->[thumbs up] Good job, Paul! LOL I do that all the time... it's what makes that [edit] button oh-so-nifty ;)<!--content-->no white space in your source code, no identation at all would increase copyright-protection because it would be so much harder for another programmer to read and understand it!<!--content-->Ok.. a "programmer" can check my xhtml and css as much as he wants, and my php is nice and safe :)<!--content-->Originally posted by thys_haupt <br />
no white space in your source code, no identation at all would increase copyright-protection because it would be so much harder for another programmer to read and understand it! <br />
You want a good example of that?<br />
Check Vladdy's TT Script (<!-- m --><a class="postlink" href="http://www.klproductions.com/kltooltips/scripts/kltooltips.js">http://www.klproductions.com/kltooltips ... ooltips.js</a><!-- m -->). That's like... insane.<!--content-->Holy frick... he must've taken out the w/s after writing it, the only way you can get THAT to work...<!--content-->
 
Back
Top