learning_http_2.pdf

(5816 KB) Pobierz
HTTP
/2
A PRACTICAL GUIDE FOR BEGINNERS
Learning
Stephen Ludin & Javier Garza
A Practical Guide for Beginners
Learning HTTP/2
Stephen Ludin and Javier Garza
Beijing
Boston Farnham Sebastopol
Tokyo
Learning HTTP/2
by Stephen Ludin and Javier Garza
Copyright © 2017 Stephen Ludin, Javier Garza. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐
tutional sales department: 800-998-9938 or
corporate@oreilly.com.
Acquisitions Editor:
Brian Anderson
Editors:
Virginia Wilson and Dawn Schanafelt
Production Editor:
Shiny Kalapurakkel
Copyeditor:
Kim Cofer
Proofreader:
Sonia Saruba
June 2017:
First Edition
Indexer:
Wendy Catalano
Interior Designer:
David Futato
Cover Designer:
Karen Montgomery
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2017-05-14:
2017-10-27:
First Release
Second Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491962442
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Learning HTTP/2,
the cover image, and
related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-96244-2
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1.
The Evolution of HTTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
HTTP/0.9 and 1.0
HTTP/1.1
Beyond 1.1
SPDY
HTTP/2
2
3
4
4
4
2.
HTTP/2 Quick Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Up and Running
Get a Certificate
Use an Online Generator
Self Signed
Let’s Encrypt
Get and Run Your First HTTP/2 Server
Pick a Browser
Performance Challenges Today
The Anatomy of a Web Page Request
Critical Performance
The Problems with HTTP/1
Web Performance Techniques
Best Practices for Web Performance
Anti-Patterns
7
8
8
8
8
9
10
3.
How and Why We Hack the Web. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
11
11
14
16
21
22
30
iii
Zgłoś jeśli naruszono regulamin