This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > August 2004 > Don't bother saving white-space
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Don't bother saving white-space
|
|
| Stephen Poley 2004-08-19, 10:38 pm |
| 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/
| |
|
| 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.
| |
| Stephen Poley 2004-08-19, 10:38 pm |
| 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:
>
[color=darkred]
>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/
| |
|
| 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
| |
|
| 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.
| |
| Alan J. Flavell 2004-08-19, 10:38 pm |
| 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! ;-)
| |
| Andrew Graham 2004-08-19, 10:38 pm |
| 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.
| |
|
| 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
| |
| Nick Kew 2004-08-19, 10:38 pm |
| 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).
[color=darkred]
HTTP compression is not enabled on that URL.
[color=darkred]
Nor there.
[color=darkred]
I expect you have PPP compression enabled in your modem.
[color=darkred]
That's a significant difference. If you had HTTP compression enabled there
should be negligible difference (because that extra 162K would be wiped out).
[color=darkred]
> 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/
| |
| Andrew Thompson 2004-08-19, 10:38 pm |
| 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
| |
| Frostillicus 2004-08-19, 10:38 pm |
| I've switched to indenting my HTML out with tabs instead of spaces. It took
some getting used to as I didn't like how far they appeared to be indented
(I'm still a notepad junkie) but I got used to it and file sizes are much
smaller now (and my thumbs aren't as sore any more as I don't have to keep
hitting the space bar that much).
| |
| Jukka K. Korpela 2004-08-19, 10:38 pm |
| "Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
> I've switched to indenting my HTML out with tabs instead of spaces.
You are trolling, are you not? As usual, crossposting to two groups
without setting followups is a probable sign of spamming, trolling, or
cluelessness, and a forged From field supports this impression.
So does lack of any reference to preceding discussion (such as quotation
or summary of the message being commented on).
In HTML, a tab is equivalent to a space, except in special occasions. But
almost any use of tabs in HTML is a symptom of some misunderstanding.
Followups trimmed. Indentation of HTML source is surely not a CSS
business.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
| |
| Frostillicus 2004-08-21, 4:33 am |
| I'm not trolling and I do definitely use tabs to space out HTML as well as
CSS selectors (sorry, I should have made mention of styles since this is a
stylesheet newsgroup).
And as for cross-posting, I think you'll find the original post from Stephen
Poley was posted to more than one group, and OE must have included them all
when I clicked "reply group". I'm not losing any sleep over it...
As for the "nilspamos" in my email address, my ISP does it for me, and I've
got no problem with that. I take it you don't mind your email address being
harvested and used for the sole purpose of flooding your inbox? Enjoy your
spam!
| |
| Jukka K. Korpela 2004-08-21, 4:33 am |
| "Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
> I'm not trolling
You just confirmed it by many things, including the sending of your
message to the wrong group, contrary to Followup-To settings.
Please do not stop using your current forged address until you wish to
participate in constructive discussions.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
| |
| Stephen Poley 2004-08-21, 4:33 am |
| On Thu, 19 Aug 2004 23:26:02 +0000 (UTC), "Jukka K. Korpela"
<jkorpela@cs.tut.fi> wrote:
>"Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
>
>
>You are trolling, are you not? As usual, crossposting to two groups
>without setting followups is a probable sign of spamming, trolling, or
>cluelessness, and a forged From field supports this impression.
>So does lack of any reference to preceding discussion (such as quotation
>or summary of the message being commented on).
>
>In HTML, a tab is equivalent to a space, except in special occasions. But
>almost any use of tabs in HTML is a symptom of some misunderstanding.
>
>Followups trimmed. Indentation of HTML source is surely not a CSS
>business.
Having a bad night, Jukka? The subject matter of the thread not only can
be, but has been, raised in respect of both HTML and CSS and it appears
to be relevant to both groups.
Further, given that tab is explicitly defined as a whitespace character
in HTML, your comment on that deserves a little further explanation.
(I'll grant you the comment on the lack of any quoted material.)
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
| |
| Dr John Stockton 2004-08-21, 4:34 am |
| JRS: In article <0ms9i0lak00f4t4jqk52p57q0h7miqga43@4ax.com>, dated
Thu, 19 Aug 2004 20:49:58, seen in news:comp.infosystems.www.authoring.h
tml, Stephen Poley <sbpoleySpicedHamTrap@xs4all.nl> posted :
>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.
However, some authors - probably including many of those here - should
configure their white-space for readability.
That, IMHO, means using blank lines and indentation to indicate
structure; but not indenting by a tab at a time, which generally leads
to the right-hand end of lines being a long way from the left margin,
which is inhumane. And leads to wrapping in News.
Depending on the editor used, it may be worth stripping trailing white
space. That tends to accrue; and is trivial to remove, at great speed,
with a tool such as MiniTrue. I saved several percent the first time
that I did it.
Those whose servers allow them restricted storage space may also benefit
from white-space reduction.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/> Update hope?
| |
|
| Andrew Graham wrote:
> Stephen Poley wrote:
>
>
>
>
> Yup. Optimize those jpegs instead.
And encourage caching, instead of doing the opposite.
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
| |
|
|
| Karl Groves 2004-08-22, 12:15 pm |
|
"Stephen Poley" <sbpoleySpicedHamTrap@xs4all.nl> wrote in message
news:0ms9i0lak00f4t4jqk52p57q0h7miqga43@4ax.com...
> 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 think that a far bigger problem, in terms of download times, is in the use
of presentational elements and attributes.[1]
In fact, I was recently charged with helping one of our clients (a large
gov't entity) decrease the file size of their pages. It seems like these
folks have never even heard of CSS. A typical page for them contains 8
nested tables (3-4 deep. I've seen up to 6-deep on their pages with forms)
and all presentation with HTML. NO CSS with exception of typography. Some of
their pages are 100kb+ of HTML alone. With images, they can get to 200kb
fast.
I'm not done with the project, but I'm guessing I can get them into the
15-25kb range and still keep their exact look & feel.
[1] - bigger, as it relates to this NG. The biggest problem, of course, is
images
-Karl
| |
| Dr John Stockton 2004-08-22, 7:17 pm |
| JRS: In article <cga389$7cd$1@ngspool-d02.news.aol.com>, dated Sun, 22
Aug 2004 08:23:33, seen in news:comp.infosystems.www.authoring.html,
Karl Groves <karl@NOSPAMkarlcore.com> posted :
>In fact, I was recently charged with helping one of our clients (a large
>gov't entity) decrease the file size of their pages. It seems like these
>folks have never even heard of CSS. A typical page for them contains 8
>nested tables (3-4 deep. I've seen up to 6-deep on their pages with forms)
>and all presentation with HTML. NO CSS with exception of typography. Some of
>their pages are 100kb+ of HTML alone.
What would the size of an approximately 800*600 GIF, PNG, or whatever of
such a page be? I tested with about enough plain text (from a Web page)
to fill a printed page, and that was under 19kB as a GIF. A GIF of
proposed garden changes is here 5-6kB; about and has as much structure
as a Web page needs.
Granted, for some users it will not fill the screen; on the other hand,
all[*] who see it will see it very much as the designer intended.
[*] Well, all with colour screens and sight. The less abled might be
better served with a plain-text version.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
| |
| Nik Coughin 2004-08-22, 11:15 pm |
| Dr John Stockton wrote:
> JRS: In article <cga389$7cd$1@ngspool-d02.news.aol.com>, dated Sun,
> 22 Aug 2004 08:23:33, seen in
> news:comp.infosystems.www.authoring.html, Karl Groves
> <karl@NOSPAMkarlcore.com> posted :
>
>
> What would the size of an approximately 800*600 GIF, PNG, or whatever
> of such a page be? I tested with about enough plain text (from a Web
> page) to fill a printed page, and that was under 19kB as a GIF. A
> GIF of proposed garden changes is here 5-6kB; about and has as much
> structure as a Web page needs.
That idea is... horrible. Sorry.
| |
| Stephen Poley 2004-08-22, 11:15 pm |
| On Thu, 19 Aug 2004 23:26:02 +0000 (UTC), "Jukka K. Korpela"
<jkorpela@cs.tut.fi> wrote:
>"Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
>
>
>You are trolling, are you not? As usual, crossposting to two groups
>without setting followups is a probable sign of spamming, trolling, or
>cluelessness, and a forged From field supports this impression.
>So does lack of any reference to preceding discussion (such as quotation
>or summary of the message being commented on).
>
>In HTML, a tab is equivalent to a space, except in special occasions. But
>almost any use of tabs in HTML is a symptom of some misunderstanding.
>
>Followups trimmed. Indentation of HTML source is surely not a CSS
>business.
Having a bad night, Jukka? The subject matter of the thread not only can
be, but has been, raised in respect of both HTML and CSS and it appears
to be relevant to both groups.
Further, given that tab is explicitly defined as a whitespace character
in HTML, your comment on that deserves a little further explanation.
(I'll grant you the comment on the lack of any quoted material.)
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
| |
|
|
|
| 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.
| |
| Dr John Stockton 2004-08-23, 7:19 pm |
| JRS: In article <0ms9i0lak00f4t4jqk52p57q0h7miqga43@4ax.com>, dated
Thu, 19 Aug 2004 20:49:58, seen in news:comp.infosystems.www.authoring.h
tml, Stephen Poley <sbpoleySpicedHamTrap@xs4all.nl> posted :
>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.
However, some authors - probably including many of those here - should
configure their white-space for readability.
That, IMHO, means using blank lines and indentation to indicate
structure; but not indenting by a tab at a time, which generally leads
to the right-hand end of lines being a long way from the left margin,
which is inhumane. And leads to wrapping in News.
Depending on the editor used, it may be worth stripping trailing white
space. That tends to accrue; and is trivial to remove, at great speed,
with a tool such as MiniTrue. I saved several percent the first time
that I did it.
Those whose servers allow them restricted storage space may also benefit
from white-space reduction.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/> Update hope?
| |
| Stephen Poley 2004-08-26, 12:27 pm |
| 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:
>
[color=darkred]
>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/
| |
|
| 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
| |
| Nick Kew 2004-08-26, 12:27 pm |
| 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).
[color=darkred]
HTTP compression is not enabled on that URL.
[color=darkred]
Nor there.
[color=darkred]
I expect you have PPP compression enabled in your modem.
[color=darkred]
That's a significant difference. If you had HTTP compression enabled there
should be negligible difference (because that extra 162K would be wiped out).
[color=darkred]
> 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/
| |
| Andrew Thompson 2004-08-26, 12:27 pm |
| 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
| |
| Frostillicus 2004-08-26, 12:27 pm |
| I've switched to indenting my HTML out with tabs instead of spaces. It took
some getting used to as I didn't like how far they appeared to be indented
(I'm still a notepad junkie) but I got used to it and file sizes are much
smaller now (and my thumbs aren't as sore any more as I don't have to keep
hitting the space bar that much).
| |
| Jukka K. Korpela 2004-08-26, 12:27 pm |
| "Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
> I've switched to indenting my HTML out with tabs instead of spaces.
You are trolling, are you not? As usual, crossposting to two groups
without setting followups is a probable sign of spamming, trolling, or
cluelessness, and a forged From field supports this impression.
So does lack of any reference to preceding discussion (such as quotation
or summary of the message being commented on).
In HTML, a tab is equivalent to a space, except in special occasions. But
almost any use of tabs in HTML is a symptom of some misunderstanding.
Followups trimmed. Indentation of HTML source is surely not a CSS
business.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
| |
| Frostillicus 2004-08-26, 12:27 pm |
| I'm not trolling and I do definitely use tabs to space out HTML as well as
CSS selectors (sorry, I should have made mention of styles since this is a
stylesheet newsgroup).
And as for cross-posting, I think you'll find the original post from Stephen
Poley was posted to more than one group, and OE must have included them all
when I clicked "reply group". I'm not losing any sleep over it...
As for the "nilspamos" in my email address, my ISP does it for me, and I've
got no problem with that. I take it you don't mind your email address being
harvested and used for the sole purpose of flooding your inbox? Enjoy your
spam!
| |
| Jukka K. Korpela 2004-08-26, 12:27 pm |
| "Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
> I'm not trolling
You just confirmed it by many things, including the sending of your
message to the wrong group, contrary to Followup-To settings.
Please do not stop using your current forged address until you wish to
participate in constructive discussions.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
| |
| Brian 2004-08-26, 12:28 pm |
| Andrew Graham wrote:
> Stephen Poley wrote:
>
>
>
>
> Yup. Optimize those jpegs instead.
And encourage caching, instead of doing the opposite.
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
| |
| Stephen Poley 2004-08-26, 12:28 pm |
| On Thu, 19 Aug 2004 23:26:02 +0000 (UTC), "Jukka K. Korpela"
<jkorpela@cs.tut.fi> wrote:
>"Frostillicus" <frosty@nilspamos.iinet.net.au> wrote:
>
>
>You are trolling, are you not? As usual, crossposting to two groups
>without setting followups is a probable sign of spamming, trolling, or
>cluelessness, and a forged From field supports this impression.
>So does lack of any reference to preceding discussion (such as quotation
>or summary of the message being commented on).
>
>In HTML, a tab is equivalent to a space, except in special occasions. But
>almost any use of tabs in HTML is a symptom of some misunderstanding.
>
>Followups trimmed. Indentation of HTML source is surely not a CSS
>business.
Having a bad night, Jukka? The subject matter of the thread not only can
be, but has been, raised in respect of both HTML and CSS and it appears
to be relevant to both groups.
Further, given that tab is explicitly defined as a whitespace character
in HTML, your comment on that deserves a little further explanation.
(I'll grant you the comment on the lack of any quoted material.)
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
| |
| Dr John Stockton 2004-08-26, 11:16 pm |
| JRS: In article <0ms9i0lak00f4t4jqk52p57q0h7miqga43@4ax.com>, dated
Thu, 19 Aug 2004 20:49:58, seen in news:comp.infosystems.www.authoring.h
tml, Stephen Poley <sbpoleySpicedHamTrap@xs4all.nl> posted :
>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.
However, some authors - probably including many of those here - should
configure their white-space for readability.
That, IMHO, means using blank lines and indentation to indicate
structure; but not indenting by a tab at a time, which generally leads
to the right-hand end of lines being a long way from the left margin,
which is inhumane. And leads to wrapping in News.
Depending on the editor used, it may be worth stripping trailing white
space. That tends to accrue; and is trivial to remove, at great speed,
with a tool such as MiniTrue. I saved several percent the first time
that I did it.
Those whose servers allow them restricted storage space may also benefit
from white-space reduction.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/> Update hope?
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|