Lesson 1 · Unit 01
Navigation
What a URL says, what happens before the first byte, and redirects
What you practise
- The parts of a URL, the steps before the first byte (in one line each, from 11), redirects, the HTML response
Try a question from this lesson
Pick one
You open https://shop.example/cart?item=7#total. Which part of that address does the browser keep to itself and never send to the server?
Correct answer
The fragment, #total
Why
The fragment is a note for the browser: once the page is there, scroll to the element with that id. The request carries the path and the query, and the host travels in the Host header.
The ideas
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
The parts of a URL
A URL tells the browser how to connect, who to ask and what to ask for.
The scheme, host and port decide the connection. The path and query go in the request. The fragment stays in the browser.
https://shop.example:443/cart?item=7#total
scheme https
host shop.example
port 443 (default for https)
path /cart
query ?item=7
fragment #total (never sent)Concept
Redirects
A response with status 301 or 302 has no page in it. Its Location header names another URL, and the browser starts again from there.
Each hop is a full request and response. If the host or the scheme changed, it needs a new connection too.
http://shop.example/
-> 301 https://shop.example/
-> 301 https://www.shop.example/
-> 200 (the page)10 more exercises in the app
- 4× type the answer
- 1× match the pairs
- 3× multiple choice
- 1× fill the blanks
- 1× true or false
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.