The most commonly used version of HTTP is HTTP/1.1 , dated 1997. In 2009, Google started a new project to create a faster successor to HTTP/1.1, named SPDY. This protocol eventually became what is now a version 2.0 of the Hypertext Transfer Protocol, HTTP/2.
It is built in a way that existing web applications work, but there are new features for applications that are using the new protocol, including a faster communication speed. Some of the differences include the following:
- It is binary (HTTP/1.1 is textual).
- It is fully multiplexed, and can request data in parallel, using one TCP connection.
- It uses header compression to reduce overhead.
- Servers can push responses to the client, instead of being asked by clients periodically.
- It has a faster protocol negotiation—thanks to the Application Layer Protocol Negotiation (ALPN) extension.
HTTP/2 is supported by all major modern browsers. Go version 1.6 included transparent support for HTTP/2 and version 1.8 introduced the ability to push responses from the server to the clients.