Pergunta de entrevista da empresa Loop Commerce

What happens when you enter a URL in your browser (step by step)?

Resposta da entrevista

Sigiloso

26 de abr. de 2017

1) You open a browser and type a URL; 2) Cache: your browser checks if requested object is cached or not; 3) Browser checks server's IP address; 4) DNS lookup: OS makes DNS lookup and provides IP address to your browser; 5) Establishing TCP connection to the server; 6) TCP connection opened: browser sends the HTTP request; 7) Browser receives HTTP response.Then close TCP connection or reuse it for another request; 8) Browser checks the response whether it is a redirect, or authorization request, or an error etc; 9) Cache: if cacheable, then cache it; 10) Browser checks what kind of response it is - is it a HTML page, or a video file, or an audio file, or an image? 11) Browser renders the response. In our case it was a HTML page. 12) Browser first renders the html structure; 13) Then it sends multiple requests to fetch other hyper linked stuff like images, CSS and JavaScript files etc.