🍋
Menu
Web

HTTP/2

HTTP Version 2

A major revision of HTTP offering multiplexed streams, server push, and header compression for faster page loads.

Detail Teknis

HTTP/2 introduced binary framing (replacing HTTP/1.1's text-based protocol), multiplexing (multiple requests/responses over a single TCP connection), header compression (HPACK), and server push (proactively sending resources). A single HTTP/2 connection eliminates the 6-connection browser limit of HTTP/1.1, making domain sharding counterproductive. HTTP/3 replaces TCP with QUIC (UDP-based), eliminating head-of-line blocking and reducing connection setup time. All modern CDNs and browsers support HTTP/2.

Contoh

```javascript
// HTTP/2: web API example
const response = await fetch('/api/resource');
const data = await response.json();
console.log(data);
```

Alat Terkait

Istilah Terkait