GoogleChromeLabs/quicklink

Do not prefetch links with `download` attribute

Open

#181 aberto em 15 de mai. de 2020

Ver no GitHub
 (1 comment) (1 reaction) (0 assignees)JavaScript (431 forks)batch import
enhancementgood first issue

Métricas do repositório

Stars
 (10.861 stars)
Métricas de merge de PR
 (Mesclagem média 47d 12h) (4 fundiu PRs em 30d)

Description

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

Guia do colaborador