gijo-varghese/flying-pages

Preconnect or DNS Prefetch Cross-Origin Domains

lrehmann opened this issue · 1 comments

It isn't always possible to prefetch cross-origin resources, however, some optimizations can still be made for external links by requesting the browser prefetch the dns records or preconnect to the host. Twitter has enabled such a service while hovering over tweets to external urls.
fcc gov-twitter-preconnect

I would like to propose adding a feature to appending dns-prefetch or preconnect html tags when a user hovers or begins to click off-domain url.

<link rel="preconnect" href="https://example.com">
<link rel="dns-prefetch" href="https://example.com">

@lrehmann this sounds good. Will consider adding it