Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns-prefetch or preconnect on hover for external links [when allow-external disabled] #90

Open
lrehmann opened this issue Nov 4, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@lrehmann
Copy link

lrehmann commented Nov 4, 2020

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

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.

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

dieulot commented Apr 9, 2023

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.

@dieulot dieulot added the enhancement New feature or request label Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants