HTTP & HTTPS: How Data Travels on the Web

Lesson 4: HTTP & HTTPS

So far, you’ve learned:

  • How a browser finds a server
  • How DNS translates names into numbers

Now let’s understand how data actually travels between your browser and a server.


What Is HTTP?

HTTP stands for:

HyperText Transfer Protocol

A protocol is simply a set of rules.

HTTP defines:

  • How a browser asks for data
  • How a server responds
  • How both understand each other

Without HTTP, browsers and servers wouldn’t know how to talk.


A Simple HTTP Conversation

Think of HTTP like a conversation:

Browser:

“Please send me the homepage.”

Server:

“Here is the page.”

That’s it.
Simple, direct, and fast.


What Gets Sent Using HTTP?

HTTP is used to send:

  • Web pages
  • Images
  • Videos
  • Form data
  • API responses

Almost everything you see on the web travels using HTTP or HTTPS.


The Problem with HTTP

HTTP has one big weakness:

❌ Data is sent in plain text

That means:

  • Anyone intercepting the data can read it
  • Passwords can be stolen
  • Information can be modified

This is dangerous.


Enter HTTPS

HTTPS is the secure version of HTTP.

The S stands for Secure.

HTTPS uses encryption, which means:

  • Data is scrambled before being sent
  • Only the browser and server can read it
  • Attackers see only random characters

How HTTPS Protects You

With HTTPS:

  • Passwords stay private
  • Personal data is protected
  • Websites can be trusted more easily

This is why modern browsers show:

  • 🔒 A lock icon for HTTPS
  • ⚠️ Warnings for HTTP websites

Does HTTPS Change How the Web Works?

No.

The steps remain the same:

  1. Browser finds server (DNS)
  2. Browser sends request
  3. Server sends response

HTTPS just makes the communication safe.


Reflection Question

Think carefully:

Why do you think browsers warn users before opening an HTTP website?


Lesson Summary

  • HTTP defines how browsers and servers communicate
  • HTTP sends data in plain text
  • HTTPS encrypts data for safety
  • Secure communication is essential on the modern web

➡️ Next Lesson: What Happens After the Page Loads? (HTML, CSS & JavaScript)