filiph / linkcheck

Fast link checker
https://pub.dartlang.org/packages/linkcheck
MIT License
397 stars 51 forks source link

Handle preconnect links correctly #41

Open filiph opened 5 years ago

filiph commented 5 years ago

<link rel="preconnect" href="https://www.googletagmanager.com" /> is a hint to start DNS lookup and so on, for the domain. The actual page can be 404.

Current status:

Ideal solution:

Realistic solution:

thomasbachem commented 4 years ago

Same is true for <link rel="dns-prefetch" ...>. I also propose to just ignore those.

thomasbachem commented 4 years ago

dns-prefetch and preconnect seem to be the only ones one should ignore (source).

So the selector should not be link[href] but link[href]:not([rel~='preconnect']):not([rel~='dns-prefetch']).

levesquejf commented 3 years ago

@filiph Any updates on this? Is there a workaround with the latest version to just ignore preconnect links?

filiph commented 3 years ago

Sorry for the late reply. There is no workaround with the latest version but if you build linkcheck with the development version of Dart, you should get the behavior you expect. Sorry for not being more helpful — can't really sink more time into this at the moment.