From URL to web page: the full sequence

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

From URL to web page: the full sequence

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which step comes FIRST after you type a URL into the browser?
A The web server sends the HTML back
B The browser asks a DNS server for the IP address
2. What does the DNS server return to the browser?
A The IP address that matches the domain name
B The HTML code of the web page
3. Which is the correct order of steps?
A DNS lookup, then request to the web server, then HTML returned
B Request to the web server, then DNS lookup, then HTML returned
4. Who sends the HTTP request to the web server?
A The DNS server
B The web browser
5. Worked example: you enter www.bbc.co.uk. After DNS gives the IP address, what happens next?
A The browser sends a request to the BBC web server at that IP address
B The browser renders the BBC home page

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1URL -> DNS -> IP address Awww.bbc.co.uk -> DNS -> IP -> server
2IP address -> web server -> HTML BThe browser sends an HTTP request to the web server at that IP address, and the server sends back the HTML for the page
3The last step of the sequence is the browser turning the HTML it received into the page you see on screen CThe page cannot be rendered before the web server sends back the HTML. Rendering is the last step, not before the server
4Worked example: typing www.bbc.co.uk makes the browser ask DNS for the IP address before contacting the web server DDNS is in the wrong place. The DNS lookup must come before the request to the web server, because the browser needs the IP address first
5URL -> web server -> DNS -> HTML EThe browser sends the domain name to a DNS server, which looks it up and returns the matching IP address
6URL -> DNS -> IP -> render -> server FHTML -> browser -> render page

Definitions

URL -> DNS -> IP -> server -> HTML -> render

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
1. Browser reads the URL 2. ___ lookup finds the IP address
2.
URL -> DNS -> __ -> server -> HTML -> render
3.
3. Browser sends a request to the __________
4.
4. Server sends back ____ for the page
5.
1. Type www.bbc.co.uk in the address bar 2. DNS finds the IP for bbc.co.uk 3. Browser _______ the HTML as a page

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A url = www.bbc.co.uk
B ip = dns_lookup(url)
C page = request(ip)
D render(page)
Question 2
A url = 'www.bbc.co.uk'
B ip = dns_lookup(url)
C html = send_request(url)
D render(html)
Question 3
A url = 'www.bbc.co.uk'
B ip = dns_lookup(url)
C html = request(ip)
D render(ip)
Question 4
A # 1 Browser gets the URL
B # 2 DNS finds the IP address
C # 3 Browser requests the page
D # 4 DNS server sends back HTML
E # 5 Browser renders the page
Question 5
A # 1 Enter URL in the browser
B # 2 DNS finds the IP address
C # 3 Browser renders the page
D # 4 Web server sends back HTML
E # 5 Browser renders the page

Answer Key

From URL to web page: the full sequence
Section A: Quick Questions
Q1
B — The browser asks a DNS server for the IP address
Q2
A — The IP address that matches the domain name
Q3
A — DNS lookup, then request to the web server, then HTML returned
Q4
B — The web browser
Q5
A — The browser sends a request to the BBC web server at that IP address
Section B: Match the Pairs
Q1
URL -> DNS -> IP address → The browser sends the domain name to a DNS server, which looks it up and returns the matching IP address
Q2
IP address -> web server -> HTML → The browser sends an HTTP request to the web server at that IP address, and the server sends back the HTML for the page
Q3
The last step of the sequence is the browser turning the HTML it received into the page you see on screen → HTML -> browser -> render page
Q4
Worked example: typing www.bbc.co.uk makes the browser ask DNS for the IP address before contacting the web server → www.bbc.co.uk -> DNS -> IP -> server
Q5
URL -> web server -> DNS -> HTML → DNS is in the wrong place. The DNS lookup must come before the request to the web server, because the browser needs the IP address first
Q6
URL -> DNS -> IP -> render -> server → The page cannot be rendered before the web server sends back the HTML. Rendering is the last step, not before the server
Section C: Definitions
Q1
URL -> DNS -> IP -> server -> HTML -> render — The ordered steps after you enter a URL: the browser asks DNS for the IP address, sends a request to the web server, gets HTML back, then renders the page.
Section D: Fill in the Blanks
Q1
1. Browser reads the URL 2. DNS lookup finds the IP address
Q2
URL -> DNS -> IP -> server -> HTML -> render
Q3
3. Browser sends a request to the web server
Q4
4. Server sends back HTML for the page
Q5
1. Type www.bbc.co.uk in the address bar 2. DNS finds the IP for bbc.co.uk 3. Browser renders the HTML as a page
Section E: Spot the Error
Q1
A — The URL is text, so it must be written as a string in quotes: url = 'www.bbc.co.uk'. Without quotes it is not a valid value.
Q2
C — The request to the web server is sent using the IP address that DNS returned, not the URL. It should be send_request(ip).
Q3
D — The browser renders the HTML that the web server returned, not the IP address. It should be render(html).
Q4
D — The web server sends back the HTML, not the DNS server. The DNS server only returns the IP address. Step 4 should say Web server.
Q5
C — The steps are out of order. The browser can only render the page after it has requested it and received the HTML. Step 3 should be the browser requesting the page.