I'm trying to use http2 in my angular application. So I searched and found this chrome plugin https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en . It indicates my site doesn't support http2. I did search on google and on official angular page and didn't found any documentation. How can I make my angular app to support http2? So far I'm using HttpClient
. Thank you.
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.
© 2022 - 2024 — McMap. All rights reserved.