Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





Pages (4): [1] 2 3 4 »   Last Thread  Next Thread
Author
Thread Post New Thread   

Don't bother saving white-space
 

Stephen Poley




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
People in these groups, and on web-pages, not infrequently suggest that
it is worthwhile cutting down on white-space and comments in HTML and
CSS in order to reduce loading times. I and others have more than once
doubted this, given the data-compression in the HTTP protocol. Having
seen it suggested again a couple of times in the last few days, I
decided it was time for a test on the effect of white-space.

I took one of my pages:
http://www.xs4all.nl/~sbpoley/webmatters/checklist.html
which is 20 Kb.

I then bloated it with whitespace to 162 Kb (nothing special about that
number - it's just what it happened to end up as):
http://www.xs4all.nl/~sbpoley/misc/checklist.html

I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't
ask - I don't know either) using Opera 7.

The first page loads in 3 seconds, the second in 8 seconds - both
figures seem to be repeatable. This suggests that if you took a file
with a fairly generous 5Kb of white-space, and stripped out all of it,
loading would be speeded up by a princely one-sixth of a second. (For
comparison, the largest HTML file on my site, of 79Kb, turned out to
have just under 3Kb of compressible white-space.)

Somehow it just doesn't seem worth it ...

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Neal




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
On Thu, 19 Aug 2004 20:49:58 +0200, Stephen Poley
<sbpoleySpicedHamTrap@xs4all.nl> wrote:

> People in these groups, and on web-pages, not infrequently suggest that
> it is worthwhile cutting down on white-space and comments in HTML and
> CSS in order to reduce loading times. I and others have more than once
> doubted this, given the data-compression in the HTTP protocol. Having
> seen it suggested again a couple of times in the last few days, I
> decided it was time for a test on the effect of white-space.
>
> I took one of my pages:
> http://www.xs4all.nl/~sbpoley/webmatters/checklist.html
> which is 20 Kb.
>
> I then bloated it with whitespace to 162 Kb (nothing special about that
> number - it's just what it happened to end up as):
> http://www.xs4all.nl/~sbpoley/misc/checklist.html
>
> I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't
> ask - I don't know either) using Opera 7.
>
> The first page loads in 3 seconds, the second in 8 seconds - both
> figures seem to be repeatable.

For me, original=3secs, bloated=21 secs.

The extra white space amounts to 142 Kb. Took me 18 extra seconds to load.
About 8Kb per sec, or close to the same for the original file. This would
seem to indicate there is value in reducing white space.


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Stephen Poley




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
On Thu, 19 Aug 2004 15:00:09 -0400, Neal <neal413@yahoo.com> wrote:

>On Thu, 19 Aug 2004 20:49:58 +0200, Stephen Poley
><sbpoleySpicedHamTrap@xs4all.nl> wrote:
> 

>For me, original=3secs, bloated=21 secs.
>
>The extra white space amounts to 142 Kb. Took me 18 extra seconds to load.
>About 8Kb per sec, or close to the same for the original file. This would
>seem to indicate there is value in reducing white space.

That's interesting. I wonder what causes the difference? What browser
are you using? Are you using a 56Kb modem? - if so, it indicates that it
must be doing some compression, or the 'bloated' transmission would take
around 30 seconds.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Els




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
Stephen Poley wrote:

> On Thu, 19 Aug 2004 15:00:09 -0400, Neal
> <neal413@yahoo.com> wrote:
> 
> 
>
> That's interesting. I wonder what causes the difference?
> What browser are you using? Are you using a 56Kb modem? -
> if so, it indicates that it must be doing some compression,
> or the 'bloated' transmission would take around 30 seconds.

I'm on broadband, the first is done within a second, the second
one takes 2/3 secs.

I suppose that could add up if you're working with 'flip-
through' pages, even for broadband.

--
Els                     http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Magnum - No Way Out


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Neal




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
On Thu, 19 Aug 2004 21:39:41 +0200, Stephen Poley
<sbpoleySpicedHamTrap@xs4all.nl> wrote:

> On Thu, 19 Aug 2004 15:00:09 -0400, Neal <neal413@yahoo.com> wrote:
> 
> 
>
> That's interesting. I wonder what causes the difference? What browser
> are you using? Are you using a 56Kb modem? - if so, it indicates that it
> must be doing some compression, or the 'bloated' transmission would take
> around 30 seconds.
>

Opera 7.23 on dialup 56k, 45333 bps.


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Alan J. Flavell




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
On Thu, 19 Aug 2004, Stephen Poley wrote:

> I took one of my pages:
> http://www.xs4all.nl/~sbpoley/webmatters/checklist.html
> which is 20 Kb.
>
> I then bloated it with whitespace to 162 Kb (nothing special about that
> number - it's just what it happened to end up as):
> http://www.xs4all.nl/~sbpoley/misc/checklist.html

It may be of interest that when gzipped, your file sizes came out as
7711 and 8805 respectively.  So as we've been saying all along (well,
since NCSA X Mosaic had been supporting gzipped HTML about a decade
back, courtesy of jwz), there's far more to be gained by serving out
HTML gzipped than by fussing about a bit of white space.

thanks for the heads-up, though - no offence meant!  ;-)


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Andrew Graham




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
Stephen Poley wrote:
> last few days, I decided it was time for a test on the effect of
> white-space.
>
> I took one of my pages:
> http://www.xs4all.nl/~sbpoley/webmatters/checklist.html
> which is 20 Kb.
>
> I then bloated it with whitespace to 162 Kb (nothing special about
> that number - it's just what it happened to end up as):
> http://www.xs4all.nl/~sbpoley/misc/checklist.html
>
> I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't
> ask - I don't know either) using Opera 7.
>
> The first page loads in 3 seconds, the second in 8 seconds - both
> figures seem to be repeatable. This suggests that if you took a file

Here are two more data points for you, both over 24kbps modem from USA
west coast:

1) Firefox:
9 seconds vs. 13 seconds

2) wget:
D:\test>timethis wget -q
http://www.xs4all.nl/~sbpoley/webmatters/checklist.html | grep "Elapsed"
TimeThis :  Elapsed Time :  00:00:05.107

D:\test>timethis wget -q
http://www.xs4all.nl/~sbpoley/misc/checklist.html | grep "Elapsed"
TimeThis :  Elapsed Time :  00:00:15.322

Living in an area without high-speed connections, I appreciate more than
most the value of fast websites, but I still indent and wrap my html.
Using your page as an example, it is 19135 bytes without any newlines or
duplicate spaces, and 20803 bytes indented and wrapped at column 72.
Tiny difference.

> Somehow it just doesn't seem worth it ...

Yup. Optimize those jpegs instead.





Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Arne




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
Stephen Poley wrote:
> People in these groups, and on web-pages, not infrequently suggest that
> it is worthwhile cutting down on white-space and comments in HTML and
> CSS in order to reduce loading times. I and others have more than once
> doubted this, given the data-compression in the HTTP protocol. Having
> seen it suggested again a couple of times in the last few days, I
> decided it was time for a test on the effect of white-space.
>
> I took one of my pages:
> http://www.xs4all.nl/~sbpoley/webmatters/checklist.html
> which is 20 Kb.
>
> I then bloated it with whitespace to 162 Kb (nothing special about that
> number - it's just what it happened to end up as):
> http://www.xs4all.nl/~sbpoley/misc/checklist.html
>
> I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't
> ask - I don't know either) using Opera 7.
>
> The first page loads in 3 seconds, the second in 8 seconds - both
> figures seem to be repeatable. This suggests that if you took a file
> with a fairly generous 5Kb of white-space, and stripped out all of it,
> loading would be speeded up by a princely one-sixth of a second. (For
> comparison, the largest HTML file on my site, of 79Kb, turned out to
> have just under 3Kb of compressible white-space.)
>
> Somehow it just doesn't seem worth it ...
>

My opinion is that the total size (i.e. images included)  is to be
considered.

According to http://www.websiteoptimization.com/ a analysis on your page
/webmatters/checklist.html gives this result

Total Size:	43638 bytes
HTML:	19685
Images:	18539
CSS:	5414
Total Images:	4
Download Times*
56K 	8.90 seconds


Same analysis on the page misc/checklist.html

Total Size:	189818 bytes
HTML:	165865
Images:	18539
CSS:	5414
Total Images:	4
Download Times*
56K 	38.03 seconds

So, if (at it looks) you don't change anything else than adding
whitespace to the code, the download time change with aprox 29 sec for a
56K dial up connection!

--
Arne


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Nick Kew




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
In article <opscztqjsm6v6656@news.individual.net>,
Neal <neal413@yahoo.com> writes:
 

Compression is optional in HTTP, and only works if you've enabled it
on the server (eg with mod_deflate).
 

HTTP compression is not enabled on that URL.
 

Nor there.
 

I expect you have PPP compression enabled in your modem.
 

That's a significant difference.  If you had HTTP compression enabled there
should be negligible difference (because that extra 162K would be wiped out)
.

> For me, original=3secs, bloated=21 secs.

Either you have no PPP compression (very bad), or you have a bottleneck
elsewhere in your connection.

> About 8Kb per sec, or close to the same for the original file. This would
> seem to indicate there is value in reducing white space.

Indeed, in some circumstances there is.  But there is much more value
in mod_deflate.  And if you use that, the value in reducing whitespace
vanishes.  That applies to any repetitive patterns - such as HTML tags -
but not to comments (mentioned in passing in the OP).

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/


Post Follow-Up to this message ]
Re: Don't bother saving white-space
 

Andrew Thompson




quote this post edit post

IP Loged report this post

Old Post  08-20-04 - 03:38 AM  
On Thu, 19 Aug 2004, Stephen Poley wrote:
>On Thu, 19 Aug 2004 20:41:12 +0100, Alan J. Flavell wrote:
 
>
> It may be of interest that when gzipped, your file sizes came out as
> 7711 and 8805 respectively.

I have just been playing with various arcane
aspects of Zip compression over on c.l.j.p., so
I was particularly interested to see if you had ..

a) 'blobbed' the white-space in a large chunk, as opposed to
b) giving an extra space or two between each word,

..for example.

The reason is that most compression algorithms
will compress the 'large space' better than many
small spaces.

And.. yes, I noticed you made that mistake,
large chunks of whitespace that are easily
compressible, with a fairly clear pattern.

I would be convinced only if you started from
the outset with a more realistic (chaotic)
example.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 03:52 PM. Post New Thread   
Pages (4): [1] 2 3 4 »   Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top