Even Faster Web Sites

Steve Souders

出版时间

2009-06-20

ISBN

9780596522308

评分

★★★★★
书籍介绍
Performance is critical to the success of any web site, and yet today's web applications push browsers to their limits with increasing amounts of rich content and heavy use of Ajax. In this book, Steve Souders, web performance evangelist at Google and former Chief Performance Yahoo!, provides valuable techniques to help you optimize your site's performance. Souders' previous book, the bestselling High Performance Web Sites, shocked the web development world by revealing that 80% of the time it takes for a web page to load is on the client side. In Even Faster Web Sites, Souders and eight expert contributors provide best practices and pragmatic advice for improving your site's performance in three critical categories: *JavaScript-Get advice for understanding Ajax performance, writing efficient JavaScript, creating responsive applications, loading scripts without blocking other components, and more. *Network-Learn to share resources across multiple domains, reduce image size without loss of quality, and use chunked encoding to render pages faster. *Browser-Discover alternatives to iframes, how to simplify CSS selectors, and other techniques. Speed is essential for today's rich media web sites and Web 2.0 applications. With this book, you'll learn how to shave precious seconds off your sites' load times and make them respond even faster. This book contains six guest chapters contributed by Dion Almaer, Doug Crockford, Ben Galbraith, Tony Gentilcore, Dylan Schiemann, Stoyan Stefanov, Nicole Sullivan, and Nicholas C. Zakas.
精彩摘录
  • "Timers are the de facto standard for splitting up JavaScript code execution in browsers. Whenever a script is taking too long to complete, look to delay parts of the execution until later. Note that very small timer delays can also cause the browser to become unresponsive. It’s recommended to never "
  • "by default, all functions passed into setTimeout are run in the global context, so this is equal to window."
  • "Normally, most browsers download components in parallel, but that’s not the case for external scripts. When the browser starts downloading an external script, it won’t start any additional downloads until the script has been completely downloaded, parsed, and executed. (Any downloads that were alrea"
  • "The DEFER attribute is an easy way to avoid the bad blocking behavior of scripts with the addition of a single word: <script defer src='A.js'></script> Although DEFER is part of the HTML 4 specification, it is implemented only in Internet Explorer and in some newer browsers."
  • "There is a drawback to the synchronous loading of script blocks: If lots of code has to be downloaded and executed while parsing the head of the document, there might be a noticeable lag before the page begins to render. To alleviate this, we could have used the defer attribute on script elements. T"
  • "While the inline script is executing, all other downloads are blocked. ... In addition to blocking parallel downloads, inline scripts block rendering. ... If your site uses inline scripts, it’s important to understand how they block downloads and rendering, and to avoid this behavior if possible. Se"
  • "Preserving the order of JavaScript is critical, and this is true for CSS as well. Given the cascading nature of styles, loading them in different orders may yield undesired results. To provide consistent behavior, browsers ensure that CSS is applied in the order speci- fied. The Stylesheets in Order"
  • "In the previous section, we confirmed that browsers apply CSS (stylesheets as well as inline styles) in the order in which they appear in the HTML document. Earlier in this chapter, we verified that inline scripts block other browser activity (downloads and rendering). These insights are fairly well"
用户评论
比第一本深入一些,多了很多js的内容,不是专门搞前端的话看第一本就够了。
现在去读,已经属于非常非常古老的内容了。 附录中各种性能检测工具,多半已经成为古董而无法见到。 各种提升响应速度的技巧,由于年代感的关系,也感觉不到有什么亮点。 等等,我又不是前端,看这玩意看啥……
更多是关于前端优化的,但有些内容显然很快就会过时了
在Web的前端性能上《High Performance Web Sites》是做外科优化,而本书则是内科优化。
笔记*11,看了High Performance Web Sites不看这本就亏大了 http://stevesouders.com/efws/links.php
完整读完的第一本英文影印书。
相比 High Performance WebSites/Browser Networking, 更加关注前端技术,随着JS引擎优化,JSmin/JSLint 等工具的普及,略有过时。
挑感兴趣的几章看了,还是挺不错的
收藏