Skip to content
IGCSE·Tuition
Computer Science · Lessons

Explain a browser-server interaction

Typing an address and seeing a page takes a fraction of a second, so the steps in between are easy to skip.

On this page
  1. What are the steps from address to page?
  2. Worked example
  3. The mistake to watch for
  4. Check yourself
  5. Where does this lead next?

When you open a web page, your browser (the client) asks a web server for the files, the server sends them back, and the browser displays them. You should be able to put these steps in order and say what each one does.

This lesson builds on reading a URL and belongs to the internet security module.

What are the steps from address to page?

Suppose you type https://www.example.com/index.html.

  1. The browser reads the URL. It splits it into protocol, host name and path.
  2. The browser asks a DNS server for the IP address that belongs to www.example.com.
  3. The DNS server replies with an IP address, for example 203.0.113.5 (a documentation address, not a real site).
  4. The browser sends a request to that address, asking for /index.html, using the protocol (HTTPS).
  5. The web server finds the file and sends a response containing the page content (HTML), plus any images or style files the page names.
  6. The browser renders the page, turning the HTML into what you see, and may request more files.

A browser does the reading, requesting and displaying. A server does the storing and responding.

Worked example

Order the steps and name the device doing each one for the request http://www.school.example.edu/news.html.

Step 1: the browser (user’s device) splits the URL: protocol http, host www.school.example.edu, path /news.html.

Step 2: the browser sends the host name to a DNS server. The DNS server (a computer on the network) returns the IP address.

Step 3: the browser sends a request for /news.html to that IP address.

Step 4: the web server (the school’s computer) locates news.html and sends it back.

Step 5: the browser renders the HTML and shows the page.

A good exam answer names who does each step, because “the browser” and “the server” are different marks.

The mistake to watch for

Mistaken answer: “The browser sends the web address to the web server, which converts it to an IP address.”

The student gave the DNS job to the web server.

The web server hosts the website. Converting a name to an IP address is the DNS server’s job, and it happens before the request for the page is sent. The correction: browser asks DNS, DNS returns the IP address, then the browser asks the web server.

Check yourself

1. Which comes first: the browser requesting the page or the DNS lookup? Why?

Show answer

The DNS lookup comes first. The browser needs the server’s IP address before it can send the page request to the right place.

2. State what the web server sends back in response to a request.

Show answer

The requested page content, usually HTML, plus any other files the page needs such as images. The browser then renders them.

3. Which device is the client and which is the server when you open a page on your phone?

Show answer

The browser on your phone is the client. The computer that stores the website files and responds is the web server.

Where does this lead next?

Once the path of a request is clear, you can ask what happens if someone intercepts it, which leads to describing encryption. Try the mixed practice set afterwards. The safe Python reasoning sandbox is there for the small code-reading questions in this module.

Students who know the facts but order the steps unreliably sometimes just need a teacher to question them step by step, which is how we approach online one-to-one Computer Science tuition.

Questions people ask

What does a DNS server do?

A DNS (domain name system) server translates a domain name, such as example.com, into the IP address of the server that hosts the site. Computers locate each other using IP addresses, while people prefer to remember names, so this lookup comes before the page request.

What is the difference between a web browser and a web server?

A browser is software on the user's device that requests pages and displays them. A web server is a computer that stores the website files and sends them back when asked. The browser is the client, and the server responds.

What is a cookie?

A cookie is a small text file stored by the browser, sent by a website. It can remember things such as items in a basket or a language choice, so the site can recognise the same browser on later requests. Check the syllabus for how much detail is expected.

Updated:

Your next step

If sequence questions leave you listing true facts in the wrong order, a one-to-one teacher can have you explain the steps aloud and correct the gaps straight away.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service