Syllabus coverage
- Understand the difference between the internet and the world wide web: the internet is the infrastructure, and the world wide web is the collection of websites and web pages accessed using the internet
- Understand what is meant by a uniform resource locator (URL), a text-based address for a web page that can contain the protocol, the domain name and the web page or file name
- Describe the purpose and operation of hypertext transfer protocol (HTTP) and hypertext transfer protocol secure (HTTPS)
- Explain the purpose and functions of a web browser, including rendering HTML and providing bookmarks and favourites, history, multiple tabs, cookie storage, navigation tools and an address bar
- Describe how web pages are located, retrieved and displayed on a device when a user enters a URL, including the role of the web browser, IP addresses, the domain name server (DNS), the web server and HTML
- Explain what is meant by cookies and how they are used, including session cookies and persistent cookies, for saving personal details, tracking user preferences, holding items in an online shopping cart and storing login details
Part of the O Level Computer Science syllabus 2210.
Two things that are not the same
The internet is the infrastructure. It is the worldwide system of interconnected networks, joined by cables, routers, switches and servers, that carries data from one device to another. It exists whether or not anybody is looking at a page, and it carries far more than web pages: email, file transfers, video calls and the traffic of many other services all travel over the same underlying network.
The world wide web is the collection of websites and web pages accessed using the internet. It is one service that runs on top of the internet: the pages themselves, the links between them, and the web servers that hold them. The web is therefore something you use the internet to reach, not a second name for the internet.
A road network is a fair comparison. The roads are the infrastructure and they carry every kind of traffic; a chain of shops is one thing you can reach by driving on them. You can drive without visiting a shop, and a shop cannot exist without a road to it. In the same way you can be connected to the internet without opening a single web page, but a web page cannot reach you unless you are connected to the internet.
The test to apply in an exam is dependence. Cut a device off from the internet and every web page becomes unreachable, yet the internet itself has not disappeared for anybody else. The web depends on the internet; the internet does not depend on the web.
- The internet is the infrastructure: the global system of interconnected networks that data travels over.
- The world wide web is the collection of websites and web pages accessed using the internet.
- The web is one service among many that the internet carries, alongside email, file transfer and video calls.
- The web cannot work without the internet, but the internet works perfectly well without the web.
The URL: an address in parts
A uniform resource locator (URL) is a text-based address for a web page. It is what you type into the address bar or what a link points to, and it is written in a form a person can read rather than in the numeric form the network uses.
A URL can contain three parts: the protocol, the domain name and the web page or file name. In `https://www.revisionsite.example/biology/cells.html`, the protocol is `https`, the domain name is `www.revisionsite.example`, and the web page or file name is `/biology/cells.html`.
The protocol tells the browser which set of rules to use when it asks for the page. The domain name identifies the web server that holds the website, in words rather than numbers. The web page or file name identifies the particular page inside that site, and the slashes in it show which folders the page sits in.
Not every URL shows all three parts. Browsers often hide the protocol and fill it in themselves, and a URL that stops at the domain name or at a folder still works because the web server returns a default page for that address, very often one called `index.html`. The domain name, however, has to be there: without it the browser has no idea which server to ask.
| Part of the URL | In https://www.revisionsite.example/biology/cells.html | What it does |
|---|---|---|
| Protocol | https | Names the rules used to request the page, in this case HTTP secure |
| Domain name | www.revisionsite.example | Identifies the web server that holds the site, in a readable form |
| Web page or file name | /biology/cells.html | Identifies the page and the folders it sits in within that site |
HTTP: the request and the response
Hypertext transfer protocol (HTTP) is the set of rules that a web browser and a web server follow when they communicate. It works as a request and a response: the browser sends a request naming the resource it wants, and the server sends back a response containing that resource or an explanation of why it cannot be supplied.
The request carries the address of the page being asked for, and it can also carry information about the browser and about any cookie the site has previously set. The response carries a status code and, when the request succeeds, the page itself written in HTML. A status code beginning with 2 means success, one beginning with 4 means the browser asked for something that cannot be found or is not permitted, and one beginning with 5 means the server itself failed.
The purpose of HTTP is to make the web work between any browser and any server. Because the rules are agreed and public, a browser written by one company can request pages from a server run by another, and neither side needs to know anything about how the other was built. Without one shared protocol, a browser would only be able to talk to servers made by the same manufacturer, and the web as a single collection of pages would not exist.
Plain HTTP does not encrypt anything. The request and the response travel across the network as readable text, so anybody able to intercept the traffic along the route can read the page, the address asked for and anything typed into a form.
- HTTP is a request-response protocol: the browser asks, the server answers.
- The request names the resource; the response carries a status code and, if successful, the HTML.
- Its purpose is a single agreed set of rules, so any browser can work with any web server.
- Plain HTTP is not encrypted, so intercepted traffic can be read.
HTTPS: the same conversation, made private
Hypertext transfer protocol secure (HTTPS) is HTTP with encryption added. The browser and the server still exchange a request and a response in exactly the same way, but before any page data is sent they agree on encryption keys, and everything after that point is scrambled while it is in transit.
The site also has to prove who it is. It presents a digital certificate, issued by a certificate authority, which the browser checks. If the certificate is valid and matches the domain name in the URL, the browser accepts the connection and usually shows a padlock in the address bar. If it does not match, the browser warns the user, because an invalid certificate is a sign that the site may be an imitation.
The purpose of HTTPS is to protect information that must not be seen by anybody else, such as passwords, card details, messages and personal records, and to let the user confirm that the page really comes from the organisation named in the address. Because the data is encrypted in transit, intercepting it produces nothing readable.
Browsers now mark plain HTTP pages as not secure, particularly any page that asks for a password or a payment. That is why almost every site that handles a login or a payment uses HTTPS, and why the padlock is worth checking before typing anything private.
| HTTP | HTTPS | |
|---|---|---|
| What it is | The rules for requesting and transferring web pages between a browser and a web server | The same rules with encryption added |
| Is the traffic encrypted? | No, so intercepted data can be read | Yes, so intercepted data cannot be read |
| Does the site prove its identity? | No | Yes, with a digital certificate that the browser checks |
| What it is used for | Ordinary pages that carry nothing private | Logins, payments and any page carrying personal data |
The browser: purpose and functions
The main purpose of a web browser is to render hypertext markup language (HTML) and display web pages. Rendering means taking the HTML file that arrives from the server and turning it into the page on screen: working out which text is a heading, where images belong, how wide the columns are and which words are links. A browser is application software, and rendering is the job that defines it.
Around that purpose sits a set of functions that make the web usable. The address bar is where the URL is typed or shown, and modern browsers also use it to report whether the connection is secure and to suggest addresses from history. Navigation tools are the back, forward, refresh and home buttons, which move between pages already visited and reload one that has not displayed properly.
Multiple tabs let several pages stay open in one window so the user can switch between them instead of opening a new window for each. Bookmarks and favourites save the address of a page so it can be reopened later without retyping the URL, usually arranged in folders. History is the record of pages visited with the time and date, which is how a page is found again when its address has been forgotten.
The last function is storing cookies. The browser keeps the small text files that websites place on the device and sends each one back to the site that set it. Cookies are examined separately below because the syllabus treats them as a topic of their own.
| Function | What it does for the user |
|---|---|
| Rendering HTML (the main purpose) | Turns the HTML returned by the server into the page that appears on screen |
| Address bar | Where the URL is typed or displayed, and where the browser shows whether the connection is secure |
| Navigation tools | Back, forward, refresh and home buttons for moving between pages and reloading them |
| Multiple tabs | Keeps several pages open at once in one window so the user can switch between them |
| Bookmarks and favourites | Saves an address so the page can be reopened later without typing the URL again |
| History | Records the pages visited with the time and date so an earlier page can be found |
| Storing cookies | Keeps the text files a site has placed on the device and returns them to that site on later requests |
From typed address to visible page
A URL is written for people, but data is delivered to machines by IP address, the numeric address that identifies a device on a network. The browser cannot send a request until it knows the IP address of the server that holds the site, so the domain name has to be translated first.
That translation is the job of the domain name server (DNS). The DNS is a distributed directory that matches domain names to IP addresses. The browser sends the domain name to a DNS server and receives back the IP address of the web server for that site. The answer is cached for a while, which is why a second visit to the same site is often quicker than the first.
With the IP address in hand, the browser sends an HTTP or HTTPS request to the web server at that address. The web server is the computer that stores the files making up the website. It reads the request, locates the page or file named in it, and returns a response containing the HTML and a status code. Large sites may be spread over many servers in a data centre, but the job is always the same: hold the files and serve them when asked.
What comes back is HTML, the markup language in which web pages are written. HTML uses tags to describe the structure of a page: which text is a heading, where a paragraph starts, which image to place and which words form a link. The browser parses those tags, works out the layout, and paints the page on the screen. Any image, stylesheet or script that the page refers to is fetched by further requests in the same way, which is why a page can appear in stages.
Learn the sequence in order, because the question is usually worth four marks and each stage is one of them: the user enters the URL; the browser asks the DNS for the IP address of the domain name; the DNS returns the IP address; the browser sends a request to the web server at that address; the web server returns the HTML for the page; the browser renders the HTML and displays the page.
- The URL is entered, but the network routes data by IP address, not by domain name.
- The browser asks the domain name server for the IP address belonging to the domain name.
- The DNS returns the IP address of the web server that holds the site.
- The browser sends an HTTP or HTTPS request to that IP address.
- The web server finds the requested page and returns the HTML.
- The browser renders the HTML and displays the page, fetching images and other files as it needs them.
Cookies: memory for a memoryless protocol
A cookie is a small text file that a website asks the browser to store on the user's device, and that the browser sends back to that same site with later requests. It holds data, usually a name, a value, the site it belongs to and sometimes an expiry date, and it is not a program, so it cannot run on its own or carry a virus by itself.
Cookies exist because HTTP keeps no memory of earlier requests. Each request arrives at the server on its own, with nothing to say that the same person made the previous one. Without a cookie, a shopping site could not tell that the basket built on one page belongs to the person now viewing the next page, and every visit would start from nothing.
The syllabus names four uses. Cookies save personal details, so a delivery address or a form can be filled in next time. They track user preferences, such as language, text size or display settings, so the site looks the way the user left it. They hold items in an online shopping cart, so the basket survives a move from page to page. And they store login details, so a user who asked to be remembered does not have to sign in on every visit.
Because a cookie is only data stored on the device, it can be deleted at any time from the browser settings, and a user who clears cookies should expect sites to forget their preferences and sign them out.
- A cookie is a small text file stored on the device and returned to the site that set it.
- HTTP is stateless, so a cookie is how a site recognises that two requests come from the same user.
- Named uses: saving personal details, tracking user preferences, holding shopping cart items, storing login details.
- A cookie holds data only; it is not executable code.
Session cookies and persistent cookies
A session cookie exists only while the browser is open. It is created when the user arrives at the site, kept in memory while the visit lasts, and deleted when the browser is closed. Its job is to keep a single visit coherent: it is what carries the contents of a shopping basket from the product page to the checkout, or keeps a user signed in while they move around a site they have just logged into.
A persistent cookie is written to storage on the device together with an expiry date, and it survives closing the browser and restarting the computer until that date passes or the user deletes it. Its job is to remember the user between visits: staying signed in, keeping a chosen language, or remembering that a cookie notice has already been dismissed.
The distinction to write in an answer is lifetime and purpose. A session cookie lasts for one visit and holds the visit together; a persistent cookie lasts beyond the visit and carries a setting or a login forward to the next one. Both are the same kind of file and both are sent back to the site in the same way.
| Session cookie | Persistent cookie | |
|---|---|---|
| How long it lasts | Only while the browser is open | Until its expiry date, even after the browser is closed |
| Where it is kept | In memory for the length of the visit | In storage on the device |
| What it is used for | Keeping one visit together, such as a shopping basket carried from page to page | Remembering the user between visits, such as staying logged in or keeping chosen preferences |
Key terms you must be able to define
- Internet
- The infrastructure: the worldwide system of interconnected networks, joined by cables, routers, switches and servers, over which data travels.
- World wide web
- The collection of websites and web pages accessed using the internet; one service that runs on top of the internet.
- Uniform resource locator (URL)
- A text-based address for a web page. It can contain the protocol, the domain name and the web page or file name.
- Protocol
- An agreed set of rules for communication. In a URL, the protocol names the rules used to request the page, such as http or https.
- Domain name
- The readable name of a web server, such as www.revisionsite.example, which the DNS translates into an IP address.
- Hypertext transfer protocol (HTTP)
- The request-response rules a browser and a web server use: the browser asks for a resource and the server returns it, usually as HTML, with a status code.
- Hypertext transfer protocol secure (HTTPS)
- HTTP with encryption, so data cannot be read if intercepted, plus a digital certificate that proves the identity of the site.
- Digital certificate
- An electronic document issued by a certificate authority that the browser checks to confirm that a site is genuinely the one named in its URL.
- Web browser
- Application software whose main purpose is to render HTML and display web pages; its functions include an address bar, navigation tools, tabs, bookmarks, history and cookie storage.
- Rendering
- Turning the HTML returned by a web server into the layout of text, images and links that appears on the screen.
- IP address
- The numeric address that identifies a device on a network and is used to route data to it. A domain name must be translated into one before a request can be sent.
- Domain name server (DNS)
- A distributed directory that matches domain names to IP addresses, so a browser can find the server that holds a site.
- Web server
- The computer that stores the files making up a website and returns them, usually as HTML, when a browser requests them.
- HTML
- Hypertext markup language, the language web pages are written in; tags mark up headings, paragraphs, images and links, which the browser renders.
- Cookie
- A small text file that a website stores on a user's device and that the browser sends back to that site on later requests; used to save personal details, track preferences, hold shopping cart items and store login details.
- Session cookie
- A cookie that lasts only while the browser is open and is deleted when it closes; it keeps a single visit coherent, such as carrying a shopping basket between pages.
- Persistent cookie
- A cookie stored on the device with an expiry date that survives closing the browser, so a site can remember the user between visits.
In context
2210 sets its questions inside systems a student already uses - a school network, a phone, a supermarket till, a vending machine, a website. These show how the theory is applied to a context you have not seen before, then you answer for the system you are given.
The address typed in is a URL with a protocol, a domain name and a page name. The browser asks the DNS for the IP address, sends an HTTPS request to the web server, and renders the HTML that comes back. The seat chosen on the first page is still there on the payment page because a session cookie carries it, and the traveller's saved card and address appear because a persistent cookie remembered them from the last booking. The padlock matters here: without HTTPS the card details would cross the network as readable text.
A student types a domain name rather than an IP address because names are easier to remember, and lets the DNS do the translation. She keeps the revision page in one tab and a quiz in another, bookmarks the page so she can return without retyping the URL, and uses the back button when a link leads somewhere unhelpful. Closing the browser at the end of the session wipes the tabs, but the bookmark and the history entry remain.
The site is served by the school's web server and holds pages written in HTML. Because those pages contain nothing private, plain HTTP would technically work, but the school uses HTTPS anyway so that visitors cannot be redirected to an imitation of the site and so that browsers do not label it as not secure. When the site is updated, the new HTML is placed on the server and the next request returns the new version.
A site asks the visitor to accept or reject cookies. Choosing 'remember my choice' sets a persistent cookie with an expiry date a year ahead, so the notice does not appear on the next visit. The basket, meanwhile, is held in a session cookie that disappears when the browser closes, which is why an abandoned basket is often empty the next morning.
A user types an address and gets an error instead of the page. If the message says the server could not be found, the failure is at the DNS stage: the name did not resolve to an IP address. If the address resolves but the reply is a 404 status code, the DNS and the web server were both reached and the server simply has no page at that path. The two failures happen at different points in the same sequence.
Flashcards
Click a card to flip it. Mark honestly — the tracker uses this.
Exam-style questions
7 questions, 23 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Exam technique for this topic
- For the internet and the world wide web, write the syllabus wording: the internet is the infrastructure, and the world wide web is the collection of websites and web pages accessed using the internet. Add that the web is one service among several and the answer is complete.
- When asked to describe how a page is located, retrieved and displayed, put the stages in order and name the DNS and the web server separately. Each stage is usually a mark, and a jumbled answer loses them even when every fact is present.
- For HTTP and HTTPS, answer both halves of the objective: the purpose and the operation. Say that HTTP is a request-response protocol, then say that HTTPS encrypts that traffic and uses a certificate to prove the site's identity.
- For cookies, give the definition first, then the four uses the syllabus names. If the question mentions session and persistent, add the lifetime difference: session dies with the browser, persistent has an expiry date.
- A question about browser functions wants named functions with an effect on the user. 'It has tabs' earns little; 'multiple tabs let the user keep several pages open in one window and switch between them' earns the mark.
Why students lose marks here
Where this fits in O Level Computer Science 2210
This page is one topic of Cambridge O Level Computer Science 2210. O Level Computer Science 2210 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Computer Science 2210 syllabus page.