Forum Moderators: open

Message Too Old, No Replies

Whitespace

Whitespace increases size of a page.

         

onedodd

5:28 am on Apr 1, 2008 (gmt 0)

10+ Year Member




My question is simple really.

If you have a simple HTML web page that has the source code all tightly written with no lines skipped or no excessive spaces it may have an overall size of say 25 kbs.

Now you have the same HTML web page that has tons of whitespace, like many lines skipped, many spaces in between the HTML tags etc and it has an overall size of 50 kbs.

(it is called whitespace correct?) Anyway....

My question is does the search bots count all that whitespace, the entire 50 kbs as the actual size of the page? Like where you see the size of the page usually in the search results.

I was wondering because I always hear that part of optimizing a page includes keeping it light and loading fast.

Which brings me to another question: How about the load time in the browser? Does the tightly packed HTML load faster than the HTML with all the extra whitespace?

Thanks and if I am using wrong terms please correct me if you like.

drooh

6:08 am on Apr 1, 2008 (gmt 0)

10+ Year Member



I would assume the search engines take the exact file size of the page. Are you having some problems with excessive white space? There are some text editors that can trim this for you. Also if you write using a wysiwyg you will undoubtadley end up with unwanted or unecessary code. Ill use a wysiwyg sometimes for a more complex layout and then drop it down into my simple text editor to clean it up and make it pretty. I think I could easily say that writing elegant code it much like a hobbyist and his model cars and airplanes. He takes pride in every aspect of it :)

penders

12:44 pm on Apr 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would assume the search engines take the exact file size of the page.

Yes, this seems to be the case (it may be the size of the cached page?). But not all webpages have their size recorded (in Google at least). Why not? Compressed/not cached perhaps?

How about the load time in the browser? Does the tightly packed HTML load faster than the HTML with all the extra whitespace?

A smaller page will download faster. However, it is possible that the web server is serving compressed (gzip) pages to those clients that support it (most modern browsers). And this can reduce the size of a page by a lot - an abundance of white space probably wouldn't matter quite so much in this case.

IMHO, I doubt you could compress an HTML page by half (50 - 25KB) simply by removing the white-space. That is an excessive amount of white-space!