Categories
Posts

Preconnect

Chrome 46, released a few weeks ago, includes support for the preconnect resource hint. Ilya Grigorik has a good write up on Eliminating Roundtrips with Preconnect:

The preconnect HTML hint allows the application to tell the browser which sockets it will need ahead of initiating the actual requests; preconnect eliminates DNS, TCP, and TLS roundtrips from the request’s critical path.

Using it is easy:

[sourcecode lang=”html”]
<link rel="preconnect" href="//example.com">
<link rel="preconnect" href="//cdn.example.com" crossorigin>
[/sourcecode]

Currently preconnect is only supported on Firefox and Chrome ( it first appeared in Firefox 39, back in July ). This is a potentially powerful feature, definitely worth experimenting with.

Leave a Reply

Your email address will not be published. Required fields are marked *