GoogleChromeLabs/quicklink

Do not prefetch links with `download` attribute

Open

#181 geöffnet am 15. Mai 2020

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)JavaScript (431 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (10.861 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 47T 12h) (4 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide