什么时候缩小? [英] When to minify?

查看:63
本文介绍了什么时候缩小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你决定缩小是否需要
时,你会有多少javascript?

How much javascript would you have when you decide that minifying is
called for?

推荐答案

Martin Rinehart schreef :
Martin Rinehart schreef:

当你决定缩小是否要求
时,你会有多少javascript?
How much javascript would you have when you decide that minifying is
called for?



我?当它开始类似于JQuery或prototypejs时。


说真的,怎么会有人回答这么一般性的问题呢?


就个人而言,我滚动所有的JavaScript我自己(这样我就明白了我正在做什么)并且从未发现自己处于需要的状态

最小化代码。


您对当前的JavaScript有任何特定问题吗?

如果是这样,会出现什么样的问题?修的?性能? Crossbrowser

兼容性?

请详细说明。


问候,

Erwin Moller

-

有两种构建软件设计的方法:一种方法是使b
使它变得如此简单以至于显然没有任何缺陷而另一种方式是让它变得如此复杂以至于没有明显的b $ b缺陷。第一种方法要困难得多。

- C.A.R. Hoare

Me? When it starts resembling JQuery or prototypejs.

Seriously, how can anybody answer such a general question?

Personally, I roll all my JavaScript myself (that way I understand what
I am doing) and never found myself in a situation where I needed to
minimize the code.

Are you having any specific problems with your current JavaScript?
If so, what kind of problems? Maintainance? Performance? Crossbrowser
compatibility?
Please elaborate a little.

Regards,
Erwin Moller
--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare


11月14日,5:32 * pm,Martin Rinehart< MartinRineh ... @ gmail.comwrote:
On Nov 14, 5:32*pm, Martin Rinehart <MartinRineh...@gmail.comwrote:

当你决定缩小是否需要
时,你会有多少javascript?
How much javascript would you have when you decide that minifying is
called for?



我总是尽量为他们服务,但是,不要忘记将

非缩小来源保存在安全的地方:通常来源文件夹(

" deploy"文件夹包含缩小版本)。


..CSS和.html文件可以缩小。太...


带有软标签的1000行.js有几千字节的%20'...


另外,无论何时/如果UA支持它(Accept-Encoding:gzip)服务它

gzip压缩。


-

Jorge。

I always try to serve them minified, BUT, do not forget to keep the
non-minified sources in a safe place: usually a "sources" folder (a
"deploy" folder holds the minified versions).

..CSS and .html files can be "minified" too...

A 1000 lines .js with soft-tabs has several kilobytes of %20''s...

Also, whenever/if the UA supports it (Accept-Encoding: gzip) serve it
gzipped as well.

--
Jorge.


Martin Rinehart写道:
Martin Rinehart wrote:

当你决定缩小时,你会有多少javascript

要求?
How much javascript would you have when you decide that minifying is
called for?



javascript还不够javascript在世界上让缩小值得。

字面意思。

PointedEars

-

任何拍打'a'的人这个页面最好用浏览器X'标签浏览

a网页似乎渴望过去的糟糕时光,在网络之前,

当你很少有可能阅读另一台计算机,另一台文字处理器或其他网络上写的文件。 - Tim Berners-Lee

There isn''t enough "javascript" in the world to make minifying worthwhile.
Literally.
PointedEars
--
Anyone who slaps a ''this page is best viewed with Browser X'' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee


这篇关于什么时候缩小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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