What happens when you type a URL into your browser?
URL is composed of 4 parts:
- scheme
- domain
- path
- resource
-
look up ip from domain name system(DNS)
It has cache. From browser -> OS -> local network -> ISP -> DNS server
-
After find the ip, try to establish tcp connection. (3 way handshake)
-
Browser send the request header to server
-
Server processes request and sends back a response
-
Parse the html , the dom tree and css dom tree will create a render tree, combined with the javascript.
-
The last step is painted.