Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Do not fetch the full document body during favicon lookup #286

Closed
jfroelich opened this issue Oct 12, 2017 · 0 comments
Closed

Do not fetch the full document body during favicon lookup #286

jfroelich opened this issue Oct 12, 2017 · 0 comments
Assignees

Comments

@jfroelich
Copy link
Owner

Use the new streaming api when sending a request to get a doc. Use together
with TextDecoder. Stream until <head is found. Then cancel the response. Then
recreate a full html string (append ></html>), then parse that for link
tags.

This avoids the need to download the whole document. I do not think accuracy
decreases too much (e.g. fake in a js comment or something is rare).

Maybe I can avoid parsing and just search raw text for link tags, the accuracy
loss may be ok given the speed boost

Research notes on streaming fetch responses:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant