更快速网站 英文版PDF电子书下载
- 电子书积分:10 积分如何计算积分?
- 作 者:SteveSouders著
- 出 版 社:南京:东南大学出版社
- 出版年份:2010
- ISBN:9787564119348
- 页数:234 页
1.UnderstandingAjaxPerformance 1
Trade-offs 1
Principles of Optimization 1
Ajax 4
Browser 4
Wow! 5
JavaScript 6
Summary 6
2.CreatingResponsiveWebApplications 7
What Is Fast Enough? 9
Measuring Latency 10
When Latency Goes Bad 12
Threading 12
Ensuring Responsiveness 13
Web Workers 14
Gears 14
Timers 16
Effects of Memory Use on Response Time 17
Virtual Memory 18
Troubleshooting Memory Issues 18
Summary 19
3.SplittingtheInitial Payload 21
Kitchen Sink 21
Savings from Splitting 22
Finding the Split 23
Undefined Symbols and Race Conditions 24
Case Study:Google Calendar 25
4.Loading Scripts Without Blocking 27
Scripts Block 27
Making Scripts Play Nice 29
XHR Eval 29
XHR Injection 31
Script in Iframe 31
Script DOM Element 32
Script Defer 32
document.write Script Tag 33
Browser Busy Indicators 33
Ensuring(or Avoiding)Ordered Execution 35
Summarizing the Results 36
And the Winner Is 38
5.Coupling Asynchronous Scripts 41
Code Example:menu.js 42
Race Conditions 44
Preserving Order Asynchronously 45
Technique 1:Hardcoded Callback 46
Technique 2:Window Onload 47
Technique 3:Timer 48
Technique 4:Script Onload 49
Technique 5:Degrading Script Tags 50
Multiple External Scripts 52
Managed XHR 52
DOM Element and Doc Write 56
General Solution 59
Single Script 59
Multiple Scripts 60
Asynchronicity in the Real World 63
Google Analytics and Dojo 63
YUI Loader Utility 65
6.Positioning Inline Scripts 69
Inline Scripts Block 69
Move Inline Scripts to the Bottom 70
Initiate Execution Asynchronously 71
Use Script Defer 73
Preserving CSS and JavaScript Order 73
Danger:Stylesheet Followed by Inline Script 74
Inline Scripts Aren't Blocked by Most Downloads 74
Inline Scripts Are Blocked by Stylesheets 75
This Does Happen 77
7.Writing Efficient JavaScript 79
Managing Scope 79
Use Local Variables 81
Scope Chain Augmentation 83
Efficient Data Access 85
Flow Control 88
Fast Conditionals 89
Fast Loops 93
String Optimization 99
String Concatenation 99
Trimming Strings 100
Avoid Long-Running Scripts 102
Yielding Using Timers 103
Timer Patterns for Yielding 105
Summary 107
8.Scaling with Comet 109
How Comet Works 109
Transport Techniques 111
Polling 111
Long Polling 112
Forever Frame 113
XHR Streaming 115
Future Transports 116
Cross-Domain 116
Effects of Implementation on Applications 118
Managing Connections 118
Measuring Performance 119
Protocols 119
Summary 120
9.Going Beyond Gzipping 121
Why Does This Matter? 121
What Causes This? 123
Quick Review 123
The Culprit 123
Examples of Popular Turtle Tappers 124
How to Help These Users? 124
Design to Minimize Uncompressed Size 125
Educate Users 129
Direct Detection of Gzip Support 130
10.Optimizing Images 133
Two Steps to Simplify Image Optimization 134
Image Formats 135
Background 135
Characteristics of the Different Formats 137
More About PNG 139
Automated Lossless Image Optimization 141
Crushing PNGs 142
Stripping JPEG Metadata 143
Converting GIF to PNG 144
Optimizing GIF Animations 144
Smush.it 145
Progressive JPEGs for Large Images 145
Alpha Transparency:Avoid AlphaImageLoader 146
Effects of Alpha Transparency 147
AlphaImageLoader 149
Problems with AlphaImageLoader 150
Progressively Enhanced PNG8 Alpha Transparency 151
Optimizing Sprites 153
?ber-Sprite Versus Modular Sprite 154
Highly Optimized CSS Sprites 155
Other Image Optimizations 155
Avoid Scaling Images 155
Crush Generated Images 156
Favicons 157
Apple Touch Icon 158
Summary 159
11.Sharding Dominant Domains 161
Critical Path 161
Who's Sharding? 163
Downgrading to HTTP/1.0 165
Rolling Out Sharding 168
IP Address or Hostname 168
How Many Domains 168
How to Split Resources 168
Newer Browsers 169
12.Flushing the Document Early 171
Flush the Head 171
Output Buffering 173
Chunked Encoding 175
Flushing and Gzip 176
Other Intermediaries 177
Domain Blocking During Flushing 178
Browsers:The Last Hurdle 178
Flushing Beyond PHP 179
The Flush Checklist 180
13.Using Iframes Sparingly 181
The Most Expensive DOM Element 181
Iframes Block Onload 182
Parallel Downloads with Iframes 184
Script Before Iframe 184
Stylesheet Before Iframe 185
Stylesheet After Iframe 186
Connections per Hostname 187
Connection Sharing in Iframes 187
Connection Sharing Across Tabs and Windows 188
Summarizing the Cost of Iframes 190
14.Simplifying CSS Selectors 191
Types of Selectors 191
ID Selectors 192
Class Selectors 193
Type Selectors 193
Adjacent Sibling Selectors 193
Child Selectors 193
Descendant Selectors 193
Universal Selectors 194
Attribute Selectors 194
Pseudo-Classes and Pseudo-Elements 194
The Key to Efficient CSS Selectors 194
Rightmost First 195
Writing Efficient CSS Selectors 195
CSS Selector Performance 197
Complex Selectors Impact Performance(Sometimes) 197
CSS Selectors to Avoid 200
Reflow Time 201
Measuring CSS Selectors in the Real World 202
Appendix:Performance Tools 205
Index 221
- 《卓有成效的管理者 中英文双语版》(美)彼得·德鲁克许是祥译;那国毅审校 2019
- 《AutoCAD 2018自学视频教程 标准版 中文版》CAD/CAM/CAE技术联盟 2019
- 《跟孩子一起看图学英文》张紫颖著 2019
- 《AutoCAD机械设计实例精解 2019中文版》北京兆迪科技有限公司编著 2019
- 《复分析 英文版》(中国)李娜,马立新 2019
- 《张世祥小提琴启蒙教程 中英文双语版》张世祥编著 2017
- 《生物化学 本科临床 英文版》张晓伟 2018
- 《理想国 全英文原版》(古希腊)柏拉图著 2017
- 《Dreamweaver CC 2018标准实例教程 中文版》杨雪静,胡仁喜编著 2019
- 《Flash CC动画制作实用教程 中文版》麓山文化 2019
- 《中风偏瘫 脑萎缩 痴呆 最新治疗原则与方法》孙作东著 2004
- 《水面舰艇编队作战运筹分析》谭安胜著 2009
- 《王蒙文集 新版 35 评点《红楼梦》 上》王蒙著 2020
- 《TED说话的力量 世界优秀演讲者的口才秘诀》(坦桑)阿卡什·P.卡里亚著 2019
- 《燕堂夜话》蒋忠和著 2019
- 《经久》静水边著 2019
- 《魔法销售台词》(美)埃尔默·惠勒著 2019
- 《微表情密码》(波)卡西亚·韦佐夫斯基,(波)帕特里克·韦佐夫斯基著 2019
- 《看书琐记与作文秘诀》鲁迅著 2019
- 《酒国》莫言著 2019