alex / what-happens-when

An attempt to answer the age old interview question "What happens when you type google.com into your browser and press enter?"
39.51k stars 5.3k forks source link

DNS prefetching? #181

Open Fruglemonkey opened 9 years ago

Fruglemonkey commented 9 years ago

Some browsers such as chromium perform a DNS prefetch before you hit enter. The moment 'google.com' gets suggested/autocompleted, a DNS request will already have been sent off.

Possible addition?

Amar-Chaudhari commented 7 years ago

I dont think DNS prefetching works that way. DNS prefetching requires html tags to tell it to prefetch DNS records. For example - <link rel="dns-prefetch" href="//example.com">

strugee commented 7 years ago

@Amar-Chaudhari no, look at the link in the original description. Omnibox queries are prefetched in Chromium.

Amar-Chaudhari commented 7 years ago

@strugee
Yup, you are correct !
I guess it's also better to know how pre-fetching works inside a html page as that is what most other browsers are going to use.