HTTP/2: What's Changed and What Hasn't

DZone 's Guide to

HTTP/2: What's Changed and What Hasn't

HTTP/2, powered by Google's SPDY (speedy) protocol is now standard. Learn what has changed and how you can harness the revision to make better applications.

· Web Dev Zone ·
Free Resource

While driving back home, I was listening to Mark Nottingham's (who chairs IETF HTTP working group) podcast on HTTP/2 and it was very interesting to know about the upcoming changes in the HTTP protocol. After that I did some research and found some interesting findings to share with respect to HTTP/2.

HTTP/2 RFC 7540 got published in May 2015.  As the longtime backbone of Internet, HTTP has not gone through a major revision for a while. (1.1 was released in 1997) It turns out that standards usually have an even longer cycle, even in today's agile world. 

"A very interesting fact is that it is based on SPDY (pronounced speedy), which was developed by Google and after many discussions, Google decided to contribute it for HTTP/2 (great for industry)"

I have summarized key findings based on my research & study on this subject:

What's Not Changing?

HTTP/2 - What is not changing

HTTP/2 vs. HTTP 1.1 - What's not changing?

a) No New Verbs/Methods - There are no new verbs (aka. methods) and it will keep its current sub-set  - POST, GET, HEAD, OPTIONS, PUT, DELETE, TRACE and CONNECT. Interestingly the last 5 methods got added in HTTP 1.1.

b) No change in approach for Cookies 

Because of compatibility concerns, there was no proposal on changing state related mechanisms.

c) HTTP 1.1 will LIVE - You're not forced to replace HTTP 1.1 with HTTP/2 and it will let the industry decide on its future. Implementers will play a bigger role in this.

What's Changing (Major Changes Only)?

HTTP/2 - Major Changes
a) TEXT to BINARY - Text is more user friendly but binary will always be faster. I heard that it is largely dependent on implementation providers but the performance improvement can be in the range of 10-15%. Also, it decreases verbosity of the protocol.

b) Head-of-line blocking (HOL blocking) or HTTP pipelining to fully multiplexed

If you have used Firebug, you would have noticed that a typical web page makes many HTTP requests to the server to load pages faster and that means many connections to the server. Multiplexing will help in opening just a single connection per page from one origin. Fantastic news!!

c) Many Connections to Single Connection

Explained in the point above, but this is worth mentioning again :-)

d) Verbose Header to Header Compression (HPACK)

HPACK is a compression format, which will be used to represent HTTP Headers. It will be easier for programmers to leverage headers now that it is compressed (less data to move). There was a consideration to use GZIP but it was discarded because of security concerns. 


Server push will be allowed to clients and yes, that can give birth to many new design patterns. There will be a choice in the client  to turn it off.

As per h2check, 16% of websites (including Twitter, Google, Facebook) support HTTP/2 + SPDY:

Web Usage of HTTP/2Source: https://www.h2check.org/stats

Google Chrome Canary, Internet Explorer 11, Safari 9 & Firefox 36 provide full support for HTTP/2. Best of luck for its future!

http ,http 2 ,web dev

Published at DZone with permission of Ankur Kumar , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}