GoogleChromeLabs/quicklink

Do not prefetch links with `download` attribute

已关闭

#181 创建于 2020年5月15日

 (2 条评论) (1 个反应) (0 位负责人)JavaScript (426 个派生)batch import
enhancementgood first issue

仓库指标

星标
 (11,269 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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 :)

贡献者指南