Lesson 15 - Forming URLs
LEARN
Reading for Today
- Read 2.8 Special characters
- Follow Reading Schedule
Today
- Forming URLs
- BACS 200 Students Struggle with URLs
- Types of URLs
- URL Game
URL
- How we access pages and assets on the internet
- Learn about the anatomy of URLs
- Learn how to write the correct type of URLs
Web Servers and Web Browsers
- Web servers respond with the requested web pages
Example URLs
- Break down the URL into parts
- Protocol
- Domain
- Path
- Filename
Example URLs
- https://www.unco.edu/images/branding/UNC-logo.png
- Protocol - https
- Domain - www.unco.edu
- Director Path - images/branding
- Filename - UNC-logo.png
https://cas.unco.edu/cas/login.html
https://www.unco.edu/images/branding/UNC-logo.png
http://google.com
http://google.com/mail
http://google.com/mail/help.html
Types of URLs
- Absolute
- Server
- Relative
Absolute URL
- Must define protocols
- Four Parts (starts with 'http://')
Absolute URL
https://shrinking-world.com/static/images/unc/Bear.png
Server Root Relative URL
- Starts with '/'
- Use when the folders may move
Server URL
/static/images/unc/Bear.png
Relative URL
- Same directory
- Subdirectory
- Parent directory
Relative URL (while loading https://shrinking-world.com/unc/bacs200/index.html)
../../static/images/unc/Bear.png
Code Demos
BUILD
URL Game
- Play the URL Game on Assignments tab of Sensei
- Answer questions to create proper URLs
- You win when you answer 10 correctly in a row
URL GameInstructions
Login to the Sensei Server
Follow the link to URL Game
Answer the URL puzzles until you can get 10 answers in a row correct.
Each time you answer a question you will get feedback on whether the answer was correct or not and why.
The remaining questions must go to 0.