Correctly Configure (Pre) Connections

1 · Harry Roberts · Dec. 9, 2023, 8:37 p.m.
A trivial performance optimisation to help speed up third-party or other-origin requests is to preconnect them: hint that the browser should preemptively open a full connection (DNS, TCP, TLS) to the origin in question, for example: <link rel=preconnect href=https://fonts.googleapis.com> In the right circumstances, this simple, single line of HTML can make pages hundreds of milliseconds faster! But time and again, I see developers misconfiguring even this most basic of features. Because, as is ...