GoogleChromeLabs/quicklink

Do not prefetch links with `download` attribute

クローズ

#181 opened on 2020/05/15

 (2 件のコメント) (1 件のリアクション) (0 人の担当者)JavaScript (426 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (11,269 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Is your feature request related to a problem? Please describe. Currently all links are prefetched including ones intended for downloadable assets. Since these links could point to large payloads (imagine multi megabyte PDFs or zip archives) that's quite a waste of bandwidth.

I'd argue excluding links which have the download attribute would be a sensible default.

Describe the solution you'd like

document.querySelectorAll('a:not([download])')

Thank you :)

コントリビューターガイド