Home > Blockchain >  Is HTTP 2.0 the norm now?
Is HTTP 2.0 the norm now?

Time:10-06

Or is HTTP 1.1 still the norm? My interest in this stems from curiosity about the KEEP-ALIVE header.

Are modern up to date web browsers making requests over HTTP 2.0? On my mac, where I am using Apache (maintained through homebrew) is apache by default set to use HTTP 2.0 when it receives HTTP 2.0 requests?

CodePudding user response:

HTTP/2 (or above) is the norm both by number of websites, and traffic (so skewed towards popular sites that are used more).

The Web Almanac (full disclosure, I'm heavily involved in this project) sees HTTP/2 as the norm by website, when looking at the requests the websites makes (which again, will be influenced by popular third-parties that many sites use like Google Fonts, Google Analytics, Facebook tracking...etc.) and, to a slightly lesser degree by the sites host itself (i.e. where the document was served from).

Firefox also makes available Telemetry tracking HTTP version for users of it's browser and it's ~ 30% HTTP/1.1, ~50% HTTP/2 and ~ 20% HTTP/3.

Are modern up to date web browsers making requests over HTTP 2.0?

Yes, as per above. The way HTTP/2 works (note the ".0" was dropped) is it is negotiated as part of the HTTPS negotiation so if a site supports both, then the browser will prefer HTTP/2.

is apache by default set to use HTTP 2.0 when it receives HTTP 2.0 requests?

It depends on the distribution of Apache you are using really. Apache itself is notoriously conservative with changing defaults so a default build from scratch I don't think uses it by default. Homebrew looks to have the dependencies but not sure if it enables them by default. If you have it installed then just test yourself.

The Keep-Alive header was basically deprecated in HTTP 1.1 as it became the default so it was no longer necessary to send it, but most browsers still did. HTTP/2 basically includes this without the option of not using it so fully deprecates it. More details in the answer.

  • Related