O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning HTTP/2

Book Description

What can your organization gain by adopting HTTP/2? How about faster, simpler, and more robust websites and applications? This practical guide demonstrates how the latest version of the Hypertext Transfer Protocol can dramatically improve website and application performance. You’ll take a deep dive into HTTP/2 details, and learn how this updated protocol is changing the web landscape.

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. What This Book Isn’t
    3. Recommended Resources
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Safari
    7. How to Contact Us
    8. Acknowledgments
      1. Javier Garza
      2. Stephen Ludin
  2. Foreword
  3. 1. The Evolution of HTTP
    1. HTTP/0.9 and 1.0
    2. HTTP/1.1
    3. Beyond 1.1
    4. SPDY
    5. HTTP/2
  4. 2. HTTP/2 Quick Start
    1. Up and Running
    2. Get a Certificate
      1. Use an Online Generator
      2. Self Signed
      3. Let’s Encrypt
    3. Get and Run Your First HTTP/2 Server
    4. Pick a Browser
  5. 3. How and Why We Hack the Web
    1. Performance Challenges Today
      1. The Anatomy of a Web Page Request
      2. Critical Performance
      3. The Problems with HTTP/1
    2. Web Performance Techniques
      1. Best Practices for Web Performance
      2. Anti-Patterns
    3. Summary
  6. 4. Transition to HTTP/2
    1. Browser Support
    2. Moving to TLS
    3. Undoing HTTP 1.1 “Optimizations”
    4. Third Parties
    5. Supporting Older Clients
    6. Summary
  7. 5. The HTTP/2 Protocol
    1. Layers of HTTP/2
    2. The Connection
    3. Frames
    4. Streams
      1. Messages
      2. Flow Control
      3. Priority
    5. Server Push
      1. Pushing an Object
      2. Choosing What to Push
    6. Header Compression (HPACK)
    7. On the Wire
      1. A Simple GET
    8. Summary
  8. 6. HTTP/2 Performance
    1. Client Implementations
    2. Latency
    3. Packet Loss
    4. Server Push
    5. Time to First Byte (TTFB)
    6. Third Parties
    7. HTTP/2 Anti-Patterns
      1. Domain Sharding
      2. Inlining
      3. Concatenating
      4. Cookie-less Domains
      5. Spriting
      6. Prefetch
    8. Real-World Performance
      1. Performance Measurement Methodology
      2. Study 1: www.facebook.com
      3. Study 2: www.yahoo.com
    9. Summary
  9. 7. HTTP/2 Implementations
    1. Desktop Web Browsers
      1. TLS Only
      2. Disabling HTTP/2
      3. Support for HTTP/2 Server Push
      4. Connection Coalescing
      5. HTTP/2 Debugging Tools
      6. Beta Channel
    2. Mobile
    3. Mobile App Support
    4. Servers, Proxies, and Caches
    5. Content Delivery Networks (CDNs)
    6. Summary
  10. 8. Debugging h2
    1. Web Browser Developer Tools
      1. Chrome Developer Tools
      2. Firefox Developer Tools
      3. Debugging h2 on iOS Using Charles Proxy
      4. Debugging h2 on Android
    2. WebPagetest
    3. OpenSSL
      1. OpenSSL Commands
    4. nghttp2
      1. Using nghttp
    5. curl
      1. Using curl
    6. h2i
    7. Wireshark
    8. Summary
  11. 9. What Is Next?
    1. TCP or UDP?
    2. QUIC
    3. TLS 1.3
    4. HTTP/3?
    5. Summary
  12. A. HTTP/2 Frames
    1. The Frame Header
    2. DATA
      1. DATA Frame Fields
      2. DATA Frame Flags
    3. HEADERS
      1. HEADERS Frame Fields
      2. HEADERS Frame Flags
    4. PRIORITY
      1. PRIORITY Frame Fields
    5. RST_STREAM
    6. SETTINGS
      1. SETTINGS Parameters
    7. PUSH_PROMISE
      1. PUSH_PROMISE Frame Fields
      2. PUSH_PROMISE Frame Flags
    8. PING
    9. GOAWAY
      1. GOAWAY Frame Fields
    10. WINDOW_UPDATE
      1. WINDOW_UPDATE Frame Fields
    11. CONTINUATION
      1. CONTINUATION Frame Fields
      2. CONTINUATION Frame Flags
  13. B. Tools Reference
    1. Tools
    2. Browsers
    3. Servers, Proxies, and Caches
  14. Index