HomeMethod

Knowledge

Web VitalsTechniquesSnippetsAnswersImpactsBottlenecks

Inconsistent HTTP/2 usage

  • Server Configuration

Problem Summary

HTTP/2 multiplexes multiple requests over a single TCP connection, allowing parallel file downloads. Inconsistent HTTP/2 usage means some resources load over HTTP/1.1 while others use HTTP/2, negating performance benefits and potentially causing protocol overhead.

Performance Impact

  • Head-of-line blocking: HTTP/1.1 resources block each other
  • Connection setup overhead: New TCP/TLS handshakes for HTTP/1.1 resources
  • Reduced multiplexing benefits: Can’t fully leverage HTTP/2 push or multiplexing
  • Inconsistent performance: Some assets load faster than others unpredictably

How to Detect

  1. Chrome DevTools Security Tab: Check if all resources use the same protocol
  2. PageSpeed Insights: Flags “Does not use HTTP/2 for all resources”
  3. WebPageTest: Waterfall shows HTTP/1.1 vs HTTP/2 indicators
  4. browserling or similar: Check protocol in network headers

Solutions

1. Enable HTTP/2 Server-Wide

Ensure your web server (Apache/Nginx) has HTTP/2 enabled:

Code
# Nginxlisten 443 ssl http2;# ApacheProtocols h2 http/1.1

2. Use HTTPS Consistently

HTTP/2 requires TLS. Ensure all resources load over HTTPS.

3. Check CDN Configuration

Verify your CDN serves all assets over HTTP/2 or HTTP/3.

4. Update External Resources

If third-party scripts load over HTTP/1.1, contact vendors or find alternatives.

Further Reading

Support our family now