Skip to content

Latest commit

 

History

History
107 lines (73 loc) · 3.24 KB

File metadata and controls

107 lines (73 loc) · 3.24 KB

Practice Lab 1: Practice - The HTTP Protocol

Objective: Students will analyze and understand the different components of a URL through guided exercises.

Example URL:

https://thearthacking.io:8123/dir/test;id=89?name=omar&x=true

Instructions

  1. Read through the example URL carefully.
  2. Complete the exercises below based on your understanding of the URL components.

Part 1: Identify the Components

Exercise 1: Component Identification

Task: Identify and label each component of the URL. Use the table below to fill in your answers.

Component Your Answer
Scheme
Host
Path
Path-segment-parameters
Port
Query-string

Part 2: Explain Each Component

Exercise 2: Explanation

Task: For each component you identified in Exercise 1, write a short explanation. Use the questions below to guide your responses.

  1. Scheme: What does it indicate about the type of connection?
  2. Host: Why is it important?
  3. Path: What does it specify?
  4. Path-segment-parameters: What is their purpose? Provide an example.
  5. Port: What does it signify, and why might it be non-standard?
  6. Query-string: How is it structured, and what is its purpose?

Write your answers here:

  1. Scheme:

  2. Host:

  3. Path:

  4. Path-segment-parameters:

  5. Port:

  6. Query-string:


Part 3: Create Your Own URL

Exercise 3: Construct a URL

Task: Create your own URL using the specifications below. Fill in the template provided.

  • Use the HTTPS scheme.
  • Choose a unique domain name for your host (e.g., mywebsite.com).
  • Specify a port number (you can choose a standard port like 443 or a non-standard port like 3000).
  • Define a path (e.g., /products/item).
  • Include a path-segment-parameter with an identifier (e.g., ;id=42).
  • Add at least two key-value pairs to the query-string (e.g., ?category=books&sort=asc).

Your URL:

https://_________________:______/______________;id=____?______________&_______________

Part 4: Discuss Real-World Applications

Exercise 4: Group Discussion

Task: In small groups, discuss the following questions. Assign one student to take notes, and prepare to share your thoughts with the class.

  1. How does URL structure affect search engine optimization (SEO)?
  2. What security issues can arise from poorly structured URLs?
  3. How can developers use the query-string to improve user experience?

Group Notes:

  • SEO Discussion:

  • Security Issues:

  • User Experience Improvements:


Conclusion

Once you have completed all the exercises, review your answers with your classmates and discuss your URL examples. This practice will help you gain a solid understanding of how URLs work and why they are important in web development and navigation.