Open lrehmann opened 3 years ago
That’s something I’d like to do.
I know that Chrome, at least, already do similar things automatically, so I'll need to investigate to learn what’s useful and what’s redundant. I’m guessing browsers wouldn’t go farther than prefetching DNS, especially on mobile, so I’m hopeful a JavaScript solution can help via preconnect
.
It isn't always appropriate to enable 'allow-external', 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](https://user-images.githubusercontent.com/6685076/98158229-6ba40500-1e8f-11eb-81e3-3d5abbe2379e.png)
I would like to propose adding a flag for 'external-preconnect' and appending dns-prefetch or preconnect html tags when a user hovers or begins to click off-domain url.