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/
Jul 20 '05
45 3498
In article <op************ **@news.individ ual.net>,
Neal <ne*****@yahoo. com> writes: 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
Compression is optional in HTTP, and only works if you've enabled it
on the server (eg with mod_deflate). http://www.xs4all.nl/~sbpoley/webmatters/checklist.html which is 20 Kb.
HTTP compression is not enabled on that URL.
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
Nor there.
I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't ask - I don't know either) using Opera 7.
I expect you have PPP compression enabled in your modem.
The first page loads in 3 seconds, the second in 8 seconds - both figures seem to be repeatable.
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/
On Thu, 19 Aug 2004, Stephen Poley wrote: On Thu, 19 Aug 2004 20:41:12 +0100, Alan J. Flavell wrote: 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.
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
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).
"Frostillic us" <fr****@nilspam os.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 misunderstandin g.
Followups trimmed. Indentation of HTML source is surely not a CSS
business.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
On Thu, 19 Aug 2004 23:26:02 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tu t.fi> wrote: "Frostillic us" <fr****@nilspam os.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.
Odd you waited to tear him a new asshole when nine others, including me,
have participated in this crossposted thread prior. Unless I'm missing a
finer point, I hardly think it's fair. If I am missing a finer point,
apologies.
On Thu, 19 Aug 2004 23:26:02 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote: "Frostillicu s" <fr****@nilspam os.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 misunderstandin g.
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/
Stephen Poley <sb************ ******@xs4all.n l> wrote: I should perhaps have spelt things out a little more explicitly. The point is that with realistic examples the difference in speed is too small for me to measure (the same going for your example), so I made an unrealistic example to see what happened.
My example shows that there is no size issue, so you've created a
problem in order to demonstrate that if you create this problem it's not
as much of a problem as you may have thought before you created the
problem.
Huh?
--
Spartanicus
On Thu, 19 Aug 2004, Jukka K. Korpela wrote: 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 misunderstandin g.
Come again? I always use tabs to make my source more readable and
I cannot see what should be wrong with it.
--
Top-posting.
What's the most irritating thing on Usenet?
Jukka K. Korpela said the following on 20/08/2004 01:26: "Frostillic us" <fr****@nilspam os.iinet.net.au > wrote:
I've switched to indenting my HTML out with tabs instead of spaces. You are trolling, are you not?
I don't think Frostillicus was, but are you?
As usual, crossposting to two groups without setting followups is a probable sign of spamming, trolling, or cluelessness,
Then why do you blame him for that? Stephen Poley started the thread and
he didn't set a followup, nor did the 12 others who replied (by that
time) to it. Not that I see a reason for setting it, since it's relevant
to both groups.
and a forged From field supports this impression.
Sure .. it's one big conspiracy.
So does lack of any reference to preceding discussion (such as quotation or summary of the message being commented on).
I think it's more productive to explain what people did wrong (according
to your beliefs or to nettiquette) than just picking on them. If you
explain it people might understand why some things are better or
preffered. I had problems with anyone saying that top posting was wrong
untill somebody took the time to explain it to me. Result: I don't top
post anymore.
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 misunderstandin g.
You didn't get the point. It wasn't about how a tab or a space is
*rendered*, it's about (source)file *size* (as was mentioned, but you
didn't quote *that* part). One tab is one character, serveral spaces are
several characters. It's plain simple.
Followups trimmed. Indentation of HTML source is surely not a CSS business.
How about indenting CSS files? If you took the time to think about it,
you would see that his point is as valid for HTML as CSS (although the
later one wasn't mentioned).
--
Regards
Harrie This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b. Yahoo store was originally written in Lisp.
c. Emacs
The issues with these will probably come up, so I might as well
mention them myself (which will also make this a more balanced
|
by: theodp |
last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml
Microsoft Patents Saving The Name Of A Game
Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM
from the yeah,-that's-non-obvious dept.
theodp writes "As if there weren't enough dodgy patents, here's an
excerpt from one granted to Microsoft Tuesday for a 'Method and
apparatus for displaying information regarding stored data in a gaming
system': 'When saving a game,...
|
by: Xiaotian Sun |
last post by:
I added the following line to the header of my html file
<meta http-equiv="content-type" content="text/html; charset=utf-8">
hoping browsers will use UTF-8 encoding. But all browsers I tried still
use ISO-8859-1.
What did I do wrong?
Thanks,
|
by: Xah Lee |
last post by:
is there a way to condense the following loop into one line?
# -*- coding: utf-8 -*-
# python
import re, os.path
imgPaths=
# change the image path to the full sized image, if it exists
|
by: #kiss# |
last post by:
hey guy !!
i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE
the dos window open , run the .EXE and closed quickly, how could i do if i
don't want the dos window closed....what kind of code could i write at the
end ??
| |
by: Karen Grube |
last post by:
Hi!
I hate to bother you all with this, but I don't know how best to approach
a particular task.
Here's the deal:
Once a month I personally (that is, in my own personal inbox on my company's
email server) receive an email from one of our vendors to which is attached a
text file (a comma-delimited data file containing the details of our monthly
|
by: Chantal |
last post by:
Hello everybody,
I'm relatively new to javascript + DOM so I've a question :
I'm removing <div> elements in DOM with javascript.
It works perfectly in Firefox and Opera : I mean the DOM is refreshed
automatically and I see the changes.
But in IE (version 6), I don't see any changes. Do I have do to
something more with IE to tell "him" to refresh the DOM.
|
by: TheGanjaMan |
last post by:
Hi everyone,
I'm trying to write up a simple image stamper application that stamps the
Exif date information from the jpegs that I've taken from my digital
camera and saves the new file with the date stamped on the lower right
part of the picture. (I'm not an advanced programmer so my code may not
be 100% efficient - sorry, I'm still learning)
Everything works fine until the saving part. I've been able to read the
file into a...
|
by: Pradeep Varma |
last post by:
Hi,
I am using Acrobat 6.0. I am trying to save an Access report to a PDF
file using the Acrobat Distiller but came across an error message
“ActiveX component cannot create object –429”. I have tried all sorts of
things based on information that I got but not able to get rid of the
same.
The code that I use is:
|
by: Eric |
last post by:
When i bound the other form in my main form. The whole first subform
area is covered with white color. But when i bound another form its not
shows the whole area in white color. Why my one subform shows the whole
area in white color. I mean its nothing shows any thing in that area.
But my other form shows all of the fields and labels in that area where
i created it.
Thanks.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |