Angular8 use http2

Viewed 6039
3 Answers

Your Angular app does not need to support HTTP/2, your web browser and server need to support this. When that happens the Angular app will automatically use it as the browser will translate any HttpClient calls to HTTP/2 automatically.

The other answers are true for production environments. However, Angular's ng serve, which spins up a local server to serve the application in a local environment, does not currently support HTTP2.

It seems the Angular team would like to support HTTP2 in their dev server, but they are blocked by a dependent package, Express, which does not support HTTP2 despite 7 years of suggestions and complaints from their users.

There are no browser settings that need to be set. All modern browsers support http/2 by default. The place you need to actually configure http/2 is on the backend.

Related