Skip to main content

What happens when you type a URL into your browser?

URL is composed of 4 parts:

  • scheme
  • domain
  • path
  • resource
  1. look up ip from domain name system(DNS)

    It has cache. From browser -> OS -> local network -> ISP -> DNS server

  2. After find the ip, try to establish tcp connection. (3 way handshake)

  3. Browser send the request header to server

  4. Server processes request and sends back a response

  5. Parse the html , the dom tree and css dom tree will create a render tree, combined with the javascript.

  6. The last step is painted.