mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Mention TLS record sizes & MIME sniffing (#1882)
Smaller record sizes can have massive TTFB improvements for clients, and `X-CTO: nosniff` is something sites should really be doing anyway for security reasons.
This commit is contained in:
parent
f1efd707aa
commit
a8bf4df09d
@ -10,10 +10,16 @@
|
||||
|
||||
- Some software doesn’t support HTTP/2 or higher “upstream” connections at all or very well — if your Node server uses HTTP/2, you may need to downgrade.
|
||||
|
||||
- Automatic gzip/brotli compression may have their buffer sizes set too high; you can tune their buffers to be smaller for faster streaming in exchange for slightly worse compression.
|
||||
|
||||
- Check if “upstream” connections are `keep-alive`: overhead from closing and reopening connections may delay responses.
|
||||
|
||||
- For typical modern webpage filesizes, the following bullet points probably won’t matter. But if you want to stream **small chunks of data with the lowest latency**, investigate these sources of buffering:
|
||||
|
||||
- Automatic gzip/brotli compression may have their buffer sizes set too high; you can tune their buffers to be smaller for faster streaming in exchange for slightly worse compression.
|
||||
|
||||
- You can [tune HTTPS record sizes for lower latency, as described in High Performance Browser Networking](https://hpbn.co/transport-layer-security-tls/#optimize-tls-record-size).
|
||||
|
||||
- Turning off MIME sniffing with [the `X-Content-Type-Options`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options) header eliminates browser buffering at the very beginning of HTTP responses
|
||||
|
||||
### NGiNX
|
||||
|
||||
Most of NGiNX’s relevant parameters are inside [its builtin `http_proxy` module](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user