Most asked question in Frontend Interview:

What happens when you type a url in browser?

Thread 👇🏼 #100DaysOfCode
Browser checks cache to find the IP of the website. It also checks OS Cache, ISP Cache, Router cache. If not found, ISP starts DNS query to check the IP.
Then Browser initiates TCP connection with Server. Client sends Synchronise Sequence Number to the Server. If server accepts the connection then it acknowledges the packet with another packet. Client then sends acknowledgement as response to server response.
Browser sends HTTP request through the TCP connection.

Server handles the request & sends a http response(json, xml, Html etc).
Browser then accepts the data and renders the HTML. Process continues for other HTTP requests as well.

Handshake is slightly complex for HTTPS. But rest of the process is same.

Feel free to add any intermediate steps.
You can follow @nikscode.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.