高性能网站建设进阶指南

Steve Souders

出版时间

1970-01-01

ISBN

9787121105449

评分

★★★★★
书籍介绍

性能是任何一个网站成功的关键,然而,如今日益丰富的内容和大量使用Ajax的Web应用程序已迫使浏览器达到其处理能力的极限。Steve Souders是Google Web性能布道者和前Yahoo!首席性能工程师,他在本书中提供了宝贵的技术来帮助你优化网站性能。

Souders的上一本畅销书《高性能网站建设指南》(High Performance Web Sites)震惊了Web开发界,它揭示了在客户端加载一个网页的时间大约占用了总时耗的80%。在《高性能网站建设进阶指南》(Even Faster Web Sites)这本书中,Souders与另外8位专家级特约作者提供了提升网站性能的最佳实践和实用建议,主要包括以下3个关键领域:

• JavaScript——你将获得忠告:理解Ajax性能、编写高效的JavaScript、创建快速响应的应用程序、无阻塞加载脚本等。

• 网络——你将学到:跨域共享资源、无损压缩图片大小,以及使用块编码加快网页渲染。

• 浏览器——你将发现:避免或取代iframe的方法、简化CSS选择符,以及其他技术。

对于当前的富媒体网站和Web 2.0应用程序来说,速度至关重要。在本书中,你将学习如何节省宝贵的网站加载时间,使其更快地响应用户的请求。

作者简介
Steve Souders现在Google工作,负责Web性能和开源组织。他是Firebug的性能分析扩展YSlow的创建者,也是O’Reilly Web性能与运作会议Velocity的联合主席。Steve经常在技术会议和诸如Microsoft、Amazon、MySpace、 LinkedIn和Facebook这样的知名高科技公司发表演讲。 特约作者: Dion Almaer, Douglas Crockford, Ben Galbraith, Tony Gentilcore, Dylan Schiemann, Stoyan Stefanov, Nicole Sullivan, and Nicholas C. Zakas
AI导读
核心看点
  • 本书深入剖析JavaScript性能优化,详细讲解无阻塞加载脚本、拆分初始化负载及创建快速响应应用的技术。作者Steve Souders揭示了浏览器解析脚本时的阻塞机制,并提供XHR注入、Script DOM Element等具体方案,帮助开发者解决脚本加载导致的页面渲染延迟问题,确保应用流畅运行。
  • 内容涵盖网络层与浏览器渲染优化,包括跨域资源共享、图片无损压缩、块编码加速渲染及CSS选择符简化。书中强调避免iframe滥用,指导开发者通过合法合规的技术手段提升传输效率,减少不必要的网络请求与资源浪费,从底层架构上提升网站整体加载速度与用户体验。
  • 作为《高性能网站建设指南》的续作,本书聚焦Web 2.0富媒体应用的性能瓶颈。通过Google日历等真实案例,展示如何在复杂交互场景下平衡功能与性能。书中提供的最佳实践旨在帮助开发者理解浏览器工作原理,规避内存泄漏与竞争状态,构建符合现代Web标准的高性能应用。
读者共识
  • 读者普遍认为本书是前端性能优化领域的经典之作,尽管部分技术细节已随时代发展而过时,但其核心思想与优化原则依然具有极高的参考价值。许多资深开发者表示,书中关于JavaScript执行机制、浏览器渲染原理的深入剖析,帮助他们从根本上理解了性能瓶颈的成因,提升了技术视野与问题解决能力。
  • 部分读者指出,本书内容过于专业且部分案例陈旧,不适合初学者或初级开发者阅读。有评论认为书中某些技术如Gears已彻底淘汰,直接应用可能导致兼容性问题。然而,也有读者强调,学习此类经典著作的意义在于掌握性能优化的思维方式,而非具体代码,建议读者取其精华,结合现代技术进行创新应用。
  • 读者高度认可本书对Web标准与安全性的重视,认为其提供的优化建议均建立在合法合规的基础上。尽管存在技术过时的争议,但书中关于避免阻塞、减少请求、优化资源加载等原则,至今仍被广泛认可并应用于现代前端开发中。许多读者表示,反复阅读本书有助于巩固性能意识,避免在复杂项目中陷入性能陷阱。
精彩摘录
  • "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"
目录
致谢 I
前言 III
第1章:理解Ajax性能 1
1.1 权衡 1
1.2 优化原则 2

显示全部
用户评论
好好实践吧
不错书,有些东西之前没考虑过
手册
mind blowing
很长见识。这样的书应该多搞一些。
可以了解到很多原理性的内容
为了做PPT迅速过一遍,适合做成blog,写书太单薄了。
特别好的工具书,可以用来做性能优化
快速翻了下,先了解一些概念。
随着互联网的发展 网站性能优化的手段也有发展
求书
收藏