473,803 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Don't bother saving white-space

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 3500
Harrie wrote:
Jukka K. Korpela said the following on 20/08/2004 01:26:
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).


Right! And how about indenting PHP, ASP, JS, CFM, ... C, C++, C#,
Pascal, VisualBasic, etc ad infinitum? I think the list of crossposts
should be extended to cover all those other code newsgroups as well!
Matthias

Jul 20 '05 #21
On Thu, 19 Aug 2004 20:55:33 +0100, Spartanicus <me@privacy.net > wrote:
Stephen Poley <sb************ ******@xs4all.n l> wrote:
I tested them over my 46 Kbps modem connection (yes: 46, not 56; don't
ask - I don't know either)


56K is the theoretical maximum, in reality this is never achieved, sub
50K is pretty normal.


OK. In a previous configuration I always got 56 (to the nearest K), so I
assumed that was normal.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #22
On Fri, 20 Aug 2004 08:34:47 +0100, Spartanicus <me@privacy.net > wrote:
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?


<grin> Sort of. Given that the problem was too small to measure, I
attempted to ludicrously inflate the problem so as to be able to measure
it and demonstrate exactly how small it was. Or something.

I suspect we're violently agreeing with each other.

But I'm still intrigued by Neal's result, where he seems to get a little
compression, but not much.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #23
CJM
"Matthias Gutfeldt" <sa************ @gmx.net> wrote in message
news:2o******** ****@uni-berlin.de...

Right! And how about indenting PHP, ASP, JS, CFM, ... C, C++, C#,
Pascal, VisualBasic, etc ad infinitum? I think the list of crossposts
should be extended to cover all those other code newsgroups as well!


Matthias,

It's quite honourable to run to the defense of one of your pals, but this
attempt was quite lame, and entirely facetious.

The arguments about saving space are as applicable to CSS as they are to
HTML. Arguably you could say the same about ASP, PHP etc, except that what
the server transfers to the client (post-processing) is in fact HTML so we
are back to square one...

I dont think that C, C++, C# Pascal & VB have an relevance here, but even if
they did, it would break another rule of netiquette to include them all
in... Thou shalt no cross-post to more than 3 or 4 NGs! So the OP made an
entirely sensible choice.

The bottom line is that Jukka went off half-cocked. His stance on the
netiquette was arguable, he is technically wrong about the tab v. space
argument, and his silence is deafening.

Apart from this detour, this has been an interesting thread. Thanks Stephen.

Chris
Jul 20 '05 #24
On Fri, 20 Aug 2004 16:43:41 +0200, Matthias Gutfeldt
<sa************ @gmx.net> wrote:
Harrie wrote:
Jukka K. Korpela said the following on 20/08/2004 01:26:
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).


Right! And how about indenting PHP, ASP, JS, CFM, ... C, C++, C#,
Pascal, VisualBasic, etc ad infinitum? I think the list of crossposts
should be extended to cover all those other code newsgroups as well!


If it had been, it would not have been essentially wrong. At this point,
however, adding them in would be senseless.
Jul 20 '05 #25
CJM wrote:
"Matthias Gutfeldt" <sa************ @gmx.net> wrote in message
news:2o******** ****@uni-berlin.de...
Right! And how about indenting PHP, ASP, JS, CFM, ... C, C++, C#,
Pascal, VisualBasic, etc ad infinitum? I think the list of crossposts
should be extended to cover all those other code newsgroups as well!

Matthias,

It's quite honourable to run to the defense of one of your pals, but this
attempt was quite lame, and entirely facetious.


CJM, pal, why are you taking all this so dead serious? It's Friday
afternoon. Relax!
Matthias

Jul 20 '05 #26
On Fri, 20 Aug 2004 16:55:42 +0200, Stephen Poley
<sb************ ******@xs4all.n l> wrote:

But I'm still intrigued by Neal's result, where he seems to get a little
compression, but not much.

As am I. Checked modem properties, compression is on. Perhaps it's related
to my ISP, interference in the phone line, etc. It could be a lot of
things...

Just re-checked. The compact test was about 5 seconds, the spaced-out one
9 or 10. So this time there seemed to be compression. So I'll write off
the last results to some issue in the pipeline.
Jul 20 '05 #27
CJM

"Matthias Gutfeldt" <sa************ @gmx.net> wrote in message
news:2o******** ****@uni-berlin.de...

CJM, pal, why are you taking all this so dead serious? It's Friday
afternoon. Relax!
Matthias


Probably *because* it's Friday afternoon.... I want to go home.

Apologies if I misread the tone, but this seemed like a good thread going
sour....

Chris
Jul 20 '05 #28
CJM

"Stephen Poley" <sb************ ******@xs4all.n l> wrote in message
news:ij******** *************** *********@4ax.c om...

OK. In a previous configuration I always got 56 (to the nearest K), so I
assumed that was normal.


<choke>I've never had > 45, and usually nearer 40!</choke>

Still, BT promised to give us broadband by end-2005.... T-480 days and
counting...
Jul 20 '05 #29
Andreas Prilop <nh******@rrz n-user.uni-hannover.de> wrote:
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.


People often try to use tabs to tabulate data in HTML documents. Outside
<pre> (and perhaps <textarea>) elements it is doomed to fail. Inside
<pre>, it might work on sunny afternoons, but all HTML specifications
have told authors they should not really rely on that.

As regards to formatting HTML source, tabs may take you to some tab
stops, or they may not, depending on the program you're using. I don't
see why you would use tabs, when spaces work so much more reliably - who
knows what programs you might use for editing HTML in the future?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
17797
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
138
6612
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,...
28
3229
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,
14
2075
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
4
338
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 ??
0
1796
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
3
11434
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.
5
4736
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...
2
2115
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:
2
1844
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.
0
9562
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,...
0
10068
tracyyun
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...
0
9119
agi2029
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...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
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();...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
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
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.