dannyk

How the Web Works...

 • ☕️ 11 min read

I’ve been asked this question during an interview for junior positions and it definitely caught me off guard. The best way to answer this is the simple way thats listed below.

Simple

MDN: Deeper Dive

How the web works

Simplified view of what happens when you view a web page in a web browser on your computer or phone.

Web developers will benefit from understanding what’s happening in the background.

Clients & Servers

[IMG]

The other parts of the tool box

So what happens exactly? (When you type a address into the web browser)

  1. Browser goes to DNS server, finds reall address (IP address) of the server the website lives on (you find adddress of the shop)
  2. browser sends HTTP request message to server, asking to send ocpy of website to the client (youto got oth shop and order your goods) This message and all other data sent between client and server is esend scross your internet connection using TCP/IP
  3. If server approves client request, the server sends the cleint a “200 ok” message saying “ok you can look at website” and then starts sending the website files to the brwoser as a series of small chunks called dat packets (the shop gives you your good and you take them back to the house)
  4. The browser asembles the small chunks of dat into a complete website and displays it to you (the goods arrive at your door)

DNS Explained

Packets Explained

References