The Internet and the World Wide Web
How the internet differs from the web, the parts of a URL, HTTP and HTTPS, what a web browser does, how a page is found and displayed, and cookies.
WATCH IT EXPLAINED
EXPLORE IT IN 3D
The internet and the web
A model city is wired up on the bench, and your laptop is plugged into it. Read an address, ask for a page, beat a spy, draw the page and fill a cookie jar.
The internet is not the web
The internet is the network of roads; the web is the shops on those roads.
| The internet | The World Wide Web (the web) | |
|---|---|---|
| What it is | the infrastructure: a worldwide network of connected networks | the collection of websites and web pages |
| Made of | the cables, routers and servers that join them | pages that are accessed using the internet |
| Like | the roads | the shops on the roads |
The web is only one of the things that use the internet.
Watch out:Email, online games and video calls also travel over the internet, like other traffic on the roads. But they are not the web.
A URL and its parts
A URL is a web page's text address, made of a protocol, a domain name and a file name.
A URL (uniform resource locator) is a text-based address for a web page. It can contain three parts.
| Part | Example |
|---|---|
| protocol | https |
| domain name | www.school.edu.mn |
| web page/file name | notes/binary.html |
Read a domain name from the right:
mnis the country code.eduis the type of organisation.schoolis the organisation's own name.wwwis the host.
Remember:Reading from the right is also how you spot a fake link, in Cyber Security.
HTTP: how a page is asked for
With HTTP, the browser asks for a page and the server answers, all in plain text.
HTTP (hypertext transfer protocol) is the set of rules that a web browser and a web server use to transfer web pages.
- The browser sends a request that names the page it wants.
- The server sends back a response that starts with a status.
| Status | Meaning |
|---|---|
| 200 OK | the server has the page; the page's HTML comes next |
| 404 Not Found | the server does not have the page |
Watch out:HTTP sends everything as plain text. Anyone who intercepts the data on its way can read it, even a password typed into a form.
BROWSER -> SERVER
GET /notes/binary.html HTTP/1.1
Host: www.school.edu.mn
SERVER -> BROWSER
HTTP/1.1 200 OK
Content-Type: text/html
<h1>Binary</h1> ...HTTPS: the same, encrypted
HTTPS is HTTP with encryption, so intercepted data is meaningless to the person who copies it.
HTTPS (hypertext transfer protocol secure) is HTTP made secure with SSL/TLS. Its purpose is to keep the data safe on its way.
- The data sent between the browser and the web server is encrypted. If it is intercepted, it is meaningless.
- The server also proves who it is with a digital certificate.
- The browser shows
https://and a padlock.
Watch out:A padlock means the connection is encrypted. It does not prove that the website itself is honest.
How the secure connection is set up is in Cyber Security.
What a browser is for: rendering HTML
A browser's main job is to read HTML and draw the web page it describes.
A web browser is application software. Its main purpose is to render HTML (draw it on the screen) and display web pages.
The web server sends a page as HTML (hypertext markup language): text with tags around the words. For example:
<h1>marks a heading;<p>marks a paragraph.
The browser reads the tags and draws what they describe: headings, paragraphs, images and links.
Edit the HTML in the figure and watch the page change.
Everything else a browser does
Besides showing pages, a browser keeps bookmarks, history, tabs and cookies, and gives you tools to move around.
| Function | What it does |
|---|---|
| bookmarks and favourites | save a page, so you can find it again |
| history | records the pages the user visited, and when |
| tabs | allow several pages to be open at once |
| cookies | stores cookies for the sites visited |
| navigation tools | back, forward, refresh and home |
| address bar | type a URL, or see the one you are on |
Remember:A web browser is not just a page viewer. Learn these six other functions for the exam.
Finding the server: DNS
DNS turns a domain name into an IP address, like looking up a phone number by a person's name.
Computers on the internet are found by IP address, not by name. So before the browser can ask for a page, it must turn the domain name into an IP address.
- The browser sends the domain name to a domain name server (DNS).
- If that server holds the matching IP address, it sends it back.
- If not, it passes the request on to another DNS server.
- The IP address comes back to the browser.
Watch out:A DNS server only finds the address. It never sends the web page.
Fetching and displaying the page
With the IP address, the browser asks the web server for the page, then renders its HTML.
- With the IP address, the browser sends an HTTP (or HTTPS) request to the web server at that address.
- The web server finds the page and sends back its HTML.
- The browser asks for any images the page uses.
- It renders the HTML and displays the page.
Exam:A question may ask how a page is located, retrieved and displayed. Name the role of each of these five things.
| Thing | Its role |
|---|---|
| web browser | asks for the page and renders its HTML |
| IP address | identifies the web server |
| DNS | finds the IP address for the domain name |
| web server | stores and sends the pages |
| HTML | the page itself |
Cookies
A cookie is a small text file that lets a website recognise you when you come back.
A cookie is a small text file. A web server sends it, and the browser stores it on the user's computer. Each time the browser visits that website again, it sends the cookie back. So the site can recognise the user.
Cookies are used for:
- saving personal details;
- tracking user preferences, such as the language;
- holding items in an online shopping cart;
- storing login details, so the user stays logged in.
Watch out:A cookie is data, not a program. It cannot run.
name lang
value mn
site www.shop.example
expires 2029-09-24Session and persistent cookies
A session cookie dies when the browser closes; a persistent cookie stays until it expires or is deleted.
| Session cookie | Persistent cookie | |
|---|---|---|
| Kept in | memory | the computer's storage |
| How long | temporary: deleted when the browser is closed | stays after the browser is closed, until its expiry date or until the user deletes it |
| Used for | the shopping basket while you browse | remembering login details and preferences; tracking the pages a user visits, so adverts can be chosen for them |
Example:You open an online shop and put a book in your basket: that is a session cookie. Next week the shop still shows Mongolian, your chosen language: that is a persistent cookie.
- Click the stages below in the order they happen.
KEY TERMS
CHECK YOURSELF
1.What is the difference between the internet and the World Wide Web?
2.What does a DNS server do?
3.Which cookie disappears when the browser is closed?
4.In https://www.school.edu.mn/notes/binary.html, what is notes/binary.html?
5.What does the S in HTTPS stand for?
6.What is the main purpose of a web browser?
7.A website shows https:// and a padlock. What does that tell you?