Answer the question
In order to leave comments, you need to log in
How does a browser resolve a domain?
Hello everyone The
question is a bit unusual, but it became very interesting - how does the browser resolve the domain?
that is, when a string was entered in the browser, for example http://domain.com, he needs to distribute it, to understand that this is a domain request and not a search string. It then needs to determine the protocol, and the browser checks the list of hsts to understand http or https. After defining the protocol, he needs to resolve the domain, and he calls the getHostByName function and passes the domain name as an argument
According to the Internet, the browser logic is divided into certain components, each of which performs its own set of actions. I think that the browser parses the incoming request in a class that somehow relates to the component, the browser engine, and the hsts list lies somewhere in the class that relates to the storage logic. But the domain resolution (and, apparently, working with the operating system in general) is not entirely clear in which component it happens.
If anyone knows and tells, I will be very grateful
ps
Exceptional curiosity
Answer the question
In order to leave comments, you need to log in
browser checked hsts listthere are facts?
Here are the details https://habr.com/ru/company/htmlacademy/blog/254825/, except that they didn’t write about electrons :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question