Express.js Mastery / Introduction To Back-End Web Development

HTTP in Action

πŸ“– Purpose of This Note

  • Move from theory to practice by using Chrome DevTools to actually observe real HTTP requests and responses happening when browsing a website.


πŸ› οΈ Step 1: Open DevTools on a Real Website

  1. 🌍 Go to a website in Chrome β€” the example used is udemy.com.

  2. 🧰 Open Developer Tools:

    • Mac: Cmd + Option + J

    • Windows: Alt + Ctrl + J

    • Or: Right-click anywhere on the page β†’ Inspect


🌐 Step 2: Go to the Network Tab

  1. Click the Network tab.

  2. πŸ”„ Reload the page to start capturing all network activity.


πŸ“Š Step 3: Understanding the Network Tab Overview

πŸ”„ Once the page reloads, the Network tab fills with a list of every request made to load the page β€” confirming what was explained in the previous theory lecture: a single webpage triggers many separate requests.

πŸ‘€ What You'll See

  • πŸ“„ The first request at the top is for the main page itself: udemy.com.

  • πŸ“¦ Following that, many more requests appear β€” for:

    • Fonts

    • JavaScript files

    • CSS Files

    • Other assets

Columns Shown for Each Request

πŸ“Œ Column

πŸ’‘ Meaning

βœ… Status

HTTP status code (e.g. 200 OK)

πŸ“¦ Size

Size of the downloaded resource

⏱️ Time

Download time

πŸš€ Initiator

What triggered the request


πŸ”πŸ“„ Step 4: Inspecting an Individual Request (udemy.com)

πŸ–±οΈ Clicking on the udemy.com entry reveals detailed information, split into two main areas.

πŸ“¨ The Request (shown at the bottom of the panel)

  • πŸ“₯ Method: GET

  • πŸ“‚ Path: / (the root)

  • πŸ“‘ Headers: gzip compression info, cookies, and more

πŸ“€ The Response

  • πŸ•’ Response time

  • πŸͺ Cookies set

  • βœ… Status code: 200 OK


🀫 Additional DevTools Features

  • πŸ–ΌοΈ Image preview β€” thumbnail for image requests

  • πŸ‘€ Response preview β€” view raw HTML/text content

  • πŸͺ Cookies tab β€” summary of cookies set during the request

πŸ’‘ Cookies haven't been explained in detail yet β€” this is just an initial exposure. They'll be covered more thoroughly later in the course.


🎯 Quick Reference

πŸ“Œ Concept

πŸ” Where to Find It

🌐 Multiple requests per load

Network tab request list

πŸ“₯ HTTP method

Request details

πŸ“‚ Path/resource

Request details

βœ… Status code

Request list & response headers

πŸ“‘ Request headers

Compression, cookies, etc.

πŸ“€ Response headers

Timing, cookies, status

πŸ‘€ Response body

Preview/Response tab

πŸš€ Initiator

Shows what triggered the request