易截截图软件、单文件、免安装、纯绿色、仅160KB

[翻译]High Performance JavaScript(028)

JavaScript Minification  JavaScript紧凑
    JavaScript minification is the process by which a JavaScript file is stripped of everything that does not contribute to its execution. This includes comments and unnecessary whitespace. The process typically reduces the file size by half, resulting in faster downloads, and encourages programmers to write better, more extensive inline documentation.
    JavaScript紧凑指的是剔除一个JavaScript文件中一切运行无关内容的过程。包括注释和不必要的空格。该处理通常可将文件尺寸缩减到一半,其结果是下载速度更快,并鼓励程序员写出更好,更详细的内联文档。
    JSMin (http://www.crockford.com/javascript/jsmin.html), developed by Douglas Crockford, remained the standard in JavaScript minification for a long time. However, as web applications kept growing in size and complexity, many felt it was time to push JavaScript minification a step further. This is the main reason behind the development of the YUI Compressor (http://developer.yahoo.com/yui/compressor/), a tool that performs all kinds of smart operations in order to offer a higher level of compaction than other tools in a completely safe way. In addition to stripping comments and unnecessary whitespace, the YUI Compressor offers the following features:
    JSMin(http://www.crockford.com/javascript/jsmin.html),由Douglas Crockford开发,它保持了JavaScript紧凑标准很长一段时间。然而随着网络应用程序在规模和复杂性上不断增长,许多人认为JavaScript紧凑应当再向前推进一步。这是开发YUI压缩器的主要原因(http://developer.yahoo.com/yui/compressor/)它提供了所有类型的智能操作,为了提供比其它工具更高级的紧凑操作并且以完全安全的方法实现。除了剔除注释和不必要的空格,YUI压缩器还提供以下功能:
• Replacement of local variable names with shorter (one-, two-, or three-character) variable names, picked to optimize gzip compression downstream
  将局部变量名替换以更短的形式(1个,2个,或3个字符),以优化后续的gzip压缩工作
• Rep


相关文档:

通过javascript获得url参数

页面提交数据一般有两种方法:get,post。post就是所谓的form提交,使用视图;get是通过url提交。
Get方法一般用后台代码(如asp,asp.net)获得参数,代码很简单:Request.QueryString["id"];即可获取。 
有些时候需要直接在前台获取url参数,要用到javascript,js没有直接获取url参数的方法,那么,我们如何通过js ......

[翻译]High Performance JavaScript(012)

第四章  Algorithms and Flow Control  算法和流程控制
    The overall structure of your code is one of the main determinants as to how fast it will execute. Having a very small amount of code doesn't necessarily mean that it will run quickly, and having a large amount of code ......

[翻译]High Performance JavaScript(016)

Regular Expression Optimization  正则表达式优化
    Incautiously crafted regexes can be a major performance bottleneck (the upcoming section, "Runaway Backtracking" on page 91, contains several examples showing how severe this can be), but there is a lot you can do to improve re ......

[翻译]High Performance JavaScript(021)

Splitting Up Tasks  分解任务
    What we typically think of as one task can often be broken down into a series of subtasks. If a single function is taking too long to execute, check to see whether it can be broken down into a series of smaller functions that complete in smaller ......

[翻译]High Performance JavaScript(026)

Use the Fast Parts  使用速度快的部分
    Even though JavaScript is often blamed for being slow, there are parts of the language that are incredibly fast. This should come as no surprise, since JavaScript engines are built in lower-level languages and are therefore compiled. Thou ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号