Even Faster Web Sites

Performance Best Practices for Web Developers
 
 
O'Reilly Media (Verlag)
  • 1. Auflage
  • |
  • erschienen am 14. Mai 2014
  • |
  • 275 Seiten
 
E-Book | PDF mit Adobe DRM | Systemvoraussetzungen
978-0-596-55119-3 (ISBN)
 
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:JavaScriptGet advice for understanding Ajax performance, writing efficient JavaScript, creating responsive applications, loading scripts without blocking other components, and more.NetworkLearn to share resources across multiple domains, reduce image size without loss of quality, and use chunked encoding to render pages faster.BrowserDiscover 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.
  • Englisch
  • Sebastopol
  • |
  • USA
  • Windows
978-0-596-55119-3 (9780596551193)
0596551193 (0596551193)
weitere Ausgaben werden ermittelt
  • Even Faster Web Sites
  • Credits
  • Preface
  • How This Book Is Organized
  • JavaScript Performance
  • Network Performance
  • Browser Performance
  • Conventions Used in This Book
  • Comments and Questions
  • Using Code Examples
  • Safari® Books Online
  • Acknowledgments
  • 1. Understanding Ajax Performance
  • Trade-offs
  • Principles of Optimization
  • Ajax
  • Browser
  • Wow!
  • JavaScript
  • Summary
  • 2. Creating Responsive Web Applications
  • What Is Fast Enough?
  • Measuring Latency
  • When Latency Goes Bad
  • Threading
  • Ensuring Responsiveness
  • Web Workers
  • Gears
  • Timers
  • Effects of Memory Use on Response Time
  • Virtual Memory
  • Troubleshooting Memory Issues
  • Summary
  • 3. Splitting the Initial Payload
  • Kitchen Sink
  • Savings from Splitting
  • Finding the Split
  • Undefined Symbols and Race Conditions
  • Case Study: Google Calendar
  • 4. Loading Scripts Without Blocking
  • Scripts Block
  • Making Scripts Play Nice
  • XHR Eval
  • XHR Injection
  • Script in Iframe
  • Script DOM Element
  • Script Defer
  • document.write Script Tag
  • Browser Busy Indicators
  • Ensuring (or Avoiding) Ordered Execution
  • Summarizing the Results
  • And the Winner Is
  • 5. Coupling Asynchronous Scripts
  • Code Example: menu.js
  • Race Conditions
  • Preserving Order Asynchronously
  • Technique 1: Hardcoded Callback
  • Technique 2: Window Onload
  • Technique 3: Timer
  • Technique 4: Script Onload
  • Technique 5: Degrading Script Tags
  • Multiple External Scripts
  • Managed XHR
  • DOM Element and Doc Write
  • General Solution
  • Single Script
  • Multiple Scripts
  • Asynchronicity in the Real World
  • Google Analytics and Dojo
  • YUI Loader Utility
  • 6. Positioning Inline Scripts
  • Inline Scripts Block
  • Move Inline Scripts to the Bottom
  • Initiate Execution Asynchronously
  • Use Script Defer
  • Preserving CSS and JavaScript Order
  • Danger: Stylesheet Followed by Inline Script
  • Inline Scripts Aren't Blocked by Most Downloads
  • Inline Scripts Are Blocked by Stylesheets
  • This Does Happen
  • 7. Writing Efficient JavaScript
  • Managing Scope
  • Use Local Variables
  • Scope Chain Augmentation
  • Efficient Data Access
  • Flow Control
  • Fast Conditionals
  • The if statement
  • The switch statement
  • Another option: Array lookup
  • The fastest conditionals
  • Fast Loops
  • Simple loop performance boosts
  • Avoid the for-in loop
  • Unrolling loops
  • String Optimization
  • String Concatenation
  • Trimming Strings
  • Avoid Long-Running Scripts
  • Yielding Using Timers
  • Timer Patterns for Yielding
  • Summary
  • 8. Scaling with Comet
  • How Comet Works
  • Transport Techniques
  • Polling
  • Long Polling
  • Forever Frame
  • XHR Streaming
  • Future Transports
  • Cross-Domain
  • Effects of Implementation on Applications
  • Managing Connections
  • Measuring Performance
  • Protocols
  • Summary
  • 9. Going Beyond Gzipping
  • Why Does This Matter?
  • What Causes This?
  • Quick Review
  • The Culprit
  • Examples of Popular Turtle Tappers
  • How to Help These Users?
  • Design to Minimize Uncompressed Size
  • Use event delegation
  • Use relative URLs
  • Strip whitespace
  • Strip attribute quotes
  • Avoid inline styling
  • Alias JavaScript names
  • Real-world savings
  • Educate Users
  • Direct Detection of Gzip Support
  • Performing the test
  • Using the result
  • Measuring the effectiveness
  • 10. Optimizing Images
  • Two Steps to Simplify Image Optimization
  • Image Formats
  • Background
  • Graphics versus photos
  • Pixels and RGB
  • Truecolor versus palette image formats
  • Transparency and alpha channel (RGBA)
  • Interlacing
  • Characteristics of the Different Formats
  • GIF
  • JPEG
  • PNG
  • More About PNG
  • PNG8, PNG24, and PNG32
  • Comparing PNG to the other formats
  • Comparison to GIF
  • Comparison to JPEG
  • PNG transparency quirks
  • PNG8 and image editing software
  • Automated Lossless Image Optimization
  • Crushing PNGs
  • Pngcrush
  • Other PNG optimization tools
  • Stripping JPEG Metadata
  • Converting GIF to PNG
  • Optimizing GIF Animations
  • Smush.it
  • Progressive JPEGs for Large Images
  • Alpha Transparency: Avoid AlphaImageLoader
  • Effects of Alpha Transparency
  • Mountaintop corners
  • AlphaImageLoader
  • Problems with AlphaImageLoader
  • In the wild: A Yahoo! Search case study
  • Progressively Enhanced PNG8 Alpha Transparency
  • Optimizing Sprites
  • Über-Sprite Versus Modular Sprite
  • Highly Optimized CSS Sprites
  • Other Image Optimizations
  • Avoid Scaling Images
  • Crush Generated Images
  • Favicons
  • Apple Touch Icon
  • Summary
  • 11. Sharding Dominant Domains
  • Critical Path
  • Who's Sharding?
  • Downgrading to HTTP/1.0
  • Rolling Out Sharding
  • IP Address or Hostname
  • How Many Domains
  • How to Split Resources
  • Newer Browsers
  • 12. Flushing the Document Early
  • Flush the Head
  • Output Buffering
  • Chunked Encoding
  • Flushing and Gzip
  • Other Intermediaries
  • Domain Blocking During Flushing
  • Browsers: The Last Hurdle
  • Flushing Beyond PHP
  • The Flush Checklist
  • 13. Using Iframes Sparingly
  • The Most Expensive DOM Element
  • Iframes Block Onload
  • Parallel Downloads with Iframes
  • Script Before Iframe
  • Stylesheet Before Iframe
  • Stylesheet After Iframe
  • Connections per Hostname
  • Connection Sharing in Iframes
  • Connection Sharing Across Tabs and Windows
  • Summarizing the Cost of Iframes
  • 14. Simplifying CSS Selectors
  • Types of Selectors
  • ID Selectors
  • Class Selectors
  • Type Selectors
  • Adjacent Sibling Selectors
  • Child Selectors
  • Descendant Selectors
  • Universal Selectors
  • Attribute Selectors
  • Pseudo-Classes and Pseudo-Elements
  • The Key to Efficient CSS Selectors
  • Rightmost First
  • Writing Efficient CSS Selectors
  • CSS Selector Performance
  • Complex Selectors Impact Performance (Sometimes)
  • CSS Selectors to Avoid
  • Reflow Time
  • Measuring CSS Selectors in the Real World
  • A. Performance Tools
  • Packet Sniffers
  • HttpWatch
  • Firebug Net Panel
  • AOL Pagetest
  • VRTA
  • IBM Page Detailer
  • Web Inspector Resources Panel
  • Fiddler
  • Charles
  • Wireshark
  • Web Development Tools
  • Firebug
  • Web Inspector
  • IE Developer Toolbar
  • Performance Analyzers
  • YSlow
  • AOL Pagetest
  • VRTA
  • neXpert
  • Miscellaneous
  • Hammerhead
  • Smush.it
  • Cuzillion
  • UA Profiler
  • Index
  • About the Author
  • Colophon
  • Copyright

Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

30,39 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
PDF mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung des WebShops erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok