不要费心省钱 [英] Don't bother saving white-space

查看:60
本文介绍了不要费心省钱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些群组和网页上的人们,并不经常建议

值得减少空格和HTML中的评论以及

CSS in为了减少加载时间。鉴于HTTP协议中的数据压缩,我和其他人不止一次地怀疑这个问题。在过去的几天里看到它再次显示了几次,我确定是时候测试是否需要测试白色空间的影响。


我带了一个页面:
http://www.xs4all.nl/~sbpoley/webmatters/checklist.html

即20 Kb。


然后我用空白膨胀到162 Kb(没什么特别的那个

数字 - 这就是它最终发生的事情):
http://www.xs4all.nl/~sbpoley/misc/checklist.html


我在46 Kbps调制解调器连接上测试了它们(是的:46,而不是56;不要

问 - 我不知道或者使用Opera 7.


第一页加载3秒钟,第二页加载8秒钟 - 两个

数字似乎是可重复的。这表明,如果你带一个相当慷慨的5Kb白色空间的文件

,并将所有这些文件全部剥离,那么一个王子的加载会加速
加载-sixth of of second。 (对于

比较,我网站上最大的HTML文件,79Kb,结果是

只有不到3Kb的可压缩空白区域。)


不知怎的,这似乎不值得......


-

Stephen Poley

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

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/

推荐答案

2004年8月19日星期四20:49:58 +0200,Stephen Poley

< sb******************@xs4all.nl>写道:
On Thu, 19 Aug 2004 20:49:58 +0200, Stephen Poley
<sb******************@xs4all.nl> wrote:
这些群体和网页上的人,并不经常暗示,有必要减少HTML中的空格和注释,并且 CSS以减少​​加载时间。鉴于HTTP协议中的数据压缩,我和其他人不止一次地怀疑这一点。在过去的几天里再次看到它的建议几次,我决定是时候测试一下白色空间的效果了。

我拿了一个我的网页:
http://www.xs4all .nl /~sbpoley / webmatters / checklist.html
这是20 Kb。

然后我用空白膨胀到162 Kb(没什么特别的。
数字 - 这就是它最终发生的事情):
http://www.xs4all.nl/~sbpoley/misc/checklist.html

我通过46 Kbps调制解调器连接测试了它们(是的:46,不是56;不要问 - 我也不知道使用Opera 7.

第一页加载3秒钟,第二页加载8秒钟 - 两者都是
数字似乎是可重复的。
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.




对我来说,原始= 3秒,膨胀= 21秒。

额外的空白空间为142 Kb。加载了我18秒钟。

每秒大约8Kb,或原始文件接近相同。这将

似乎表明减少空白区域有价值。



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.


2004年8月19日星期四15:00:09 -0400, Neal< ne ***** @ yahoo.com>写道:
On Thu, 19 Aug 2004 15:00:09 -0400, Neal <ne*****@yahoo.com> wrote:
2004年8月19日星期四20:49:58 +0200,Stephen Poley
< sb ************* *****@xs4all.nl>写道:
On Thu, 19 Aug 2004 20:49:58 +0200, Stephen Poley
<sb******************@xs4all.nl> wrote:
第一页加载3秒钟,第二页加载8秒钟 - 两个
数字似乎都是可重复的。
The first page loads in 3 seconds, the second in 8 seconds - both
figures seem to be repeatable.


对我来说,原始= 3秒,膨胀= 21秒。

额外的白色空间达到142 Kb。加载了18秒钟。
大约每秒8Kb,或原始文件接近相同。这似乎表明减少空白区域有价值。

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.




这很有意思。我想知道是什么原因造成的?您使用什么浏览器

?您使用的是56Kb调制解调器吗? - 如果是这样,它表示它必须做一些压缩,或者'膨胀''传输将在30秒内获得



-

Stephen Poley

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


Stephen Poley写道:
Stephen Poley wrote:
2004年8月19日星期四15:00:09 -0400,Neal
< ne ***** @ yahoo.com>写道:
On Thu, 19 Aug 2004 15:00:09 -0400, Neal
<ne*****@yahoo.com> wrote:
2004年8月19日星期四20:49:58 +0200,Stephen Poley
< sb ************* *****@xs4all.nl>写道:
On Thu, 19 Aug 2004 20:49:58 +0200, Stephen Poley
<sb******************@xs4all.nl> wrote:
第一页加载3秒,第二页加载8
秒 - 这两个数字似乎都是可重复的。
The first page loads in 3 seconds, the second in 8
seconds - both figures seem to be repeatable.

对我来说,原始= 3秒,臃肿= 21秒。

额外的空白空间达到142 Kb。加载了18个额外的
秒。大约每秒8Kb,或接近原始文件的相同
。这似乎表明减少空白区域有价值。
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.



这很有趣。我想知道是什么导致了这种差异?
你使用的浏览器是什么?您使用的是56Kb调制解调器吗? -
如果是这样,它表明它必须进行一些压缩,
或臃肿的传输大约需要30秒。



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.




我在宽带上,第一次是在一秒内完成,第二次是

需要2/3秒。


我想这可能如果您正在使用翻转 -

到页面,即使是宽带,也可以加起来。


-

Els http://locusmeus.com/

Sonhos vem 。 Sonhos v?o。 Orestoébritfeito。

- Renato Russo -

现在播放:Magnum - 没有出路



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


这篇关于不要费心省钱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆