HTTP/HTTPS basics
Computer Science · Networking
Question 1 of 10
0What does the acronym TLS stand for?
Stuck? Read the explanation
Unlocks at a streak of 5 correct answers in a row.
Embed this practice on your site or class page
Paste this HTML into your page. Students practise right there; it is free and needs no account.
HTTP/HTTPS basics explained
HTTP, the Hypertext Transfer Protocol, is the set of rules that a browser and a web server use to request and send web pages and other resources. HTTPS is the same protocol with an extra layer of encryption, called TLS, which protects the data while it travels across the network. The S stands for secure.
GET asks the server for a resource, such as a web page, and POST sends data to the server, such as a form. The server answers with a status code whose first digit shows the type of result: 2 means success, 3 means the resource has moved, 4 means the client made an error, and 5 means the server failed.
HTTPS encrypts the traffic, so someone on the same Wi-Fi network cannot easily read passwords sent to the site.
A common mistake is to think the padlock in the address bar means a website is trustworthy. It only means the connection is encrypted.
Worked example
You type a web address into your browser and press Enter. The server replies with status 301, which means the page has moved, and gives a new address that starts with https. The browser then sends a new GET request to that address and receives a 200 response. Explain why the browser made two requests.
- The first request reached a page that has moved, so the server replied 301 with the new address.
- The browser made a second GET request to the new address, which is the one that returned the page.
- The 200 response means success, so the page is shown to you.
What you will practise
105 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.
Example questions
- HTTP is used to:
- A GET request:
- A POST request:
- A 404 status means:
- HTTPS adds:
- Which HTTP method is designed to remove a resource?
- The default port used by HTTP is:
- The default port used by HTTPS is:
…and 97 more.