atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.91k stars 415 forks source link

Use history to check URL existence before DNS resolving #2035

Open aartaka opened 2 years ago

aartaka commented 2 years ago

To check whether user-inputted URL is an actual website, we check it doing DNS resolving. This is slow and fast typing can invalidate it. We need a local, fast-to-access, and user activity-based source of information on which URLs are reliable. History fits it perfectly.

See https://github.com/atlas-engineer/nyxt/issues/1886#issuecomment-1015806875 fir initial discussion of it.

hendursaga commented 2 years ago

Perhaps (optionally?) include bookmarks for a source, too?

guojing0 commented 2 years ago

History, bookmarks, and all current opened websites/buffers all seem to be good source.

jmercouris commented 2 years ago

I think this is a good idea. Perhaps we can also store a cache of all DNS records? It is not too large is it?

jmercouris commented 2 years ago

Apparently there are about 360 million domains. If each domain is about 10 bytes, then that is about 3.5 gigabytes. I don't think it is /too/ unreasonable.