I would like to construct an answer that is very detailed in preparation for software engineering interviews and also to really understand what happens 'under the hood'.
What I have right now is:
When you key in the url, there is a TCP handshake that occurs between one's browser and the server. Once connection is established, the request for the webpage is routed to a server via a loadbalancer in the data centre. That particular server will return the webpage to the browser, which renders it for display based on DOM rules specified in the webpage. Hence, the speed of connection is affected by: 1) Location of data centre 2) Routing algorithm used by the load balancer 3) Time taken for the server that contains the webpage to clear the requests sent its way
This is an answer I gave in an interview, which was deemed insufficient. I understand it's probably rudimentary and am on a determined path to understanding as much as possible about this process. Please can someone shed good light on this question?