AP Computer Science Principles · Unit 4 lecture · Part 5 of 11 · 6 min

4.1 The World Wide Web and HTTPThe internet is not the Web

Mr. Thompkins
People use "the internet" and "the Web" as if they meant the same thing. On the exam they don't, and a question about the difference shows up a lot. Thirty seconds of clarity now saves you a point later.

The World Wide Web is a system of linked pages, programs and files. You open a page in a browser, it has links to other pages, and those links form a giant web. The Web uses the internet to move its pages around, but it is only one of many services that run on the internet.

HTTP, the Hypertext Transfer Protocol, is the protocol the Web uses. Your browser sends an HTTP request ("send me this page"), and the web server sends back an HTTP response containing the page. Both the request and the response travel as packets, delivered by TCP and routed by IP, just like everything else.

your browserweb serverHTTP request: send me /recipesHTTP response: here is the pageboth travel as packets, using TCP and IPthe page has links to other pagesthat web of links is the Webthe Web runs on top of the internet
An HTTP request and response. The Web is the layer of linked pages on top; the internet underneath carries the packets.
?Wait, what makes a page part of the "web"?
The links. "Hypertext" means text with links to other documents. Every page that links to others, and is linked to, is part of the web of pages. That's where the name comes from.

So what uses the internet without using the Web? A video call in a phone's calling app. An online game sending player moves. Email sent from a mail app, which uses mail protocols. They all send packets over the internet, but none of them is requesting linked web pages. The Web was first created at CERN, a physics lab in Europe, so scientists could share information quickly. It grew into something its creator never planned, which is a Unit 5 idea too.

ActivityUses the internet?Uses the Web?
Reading a news site in a browserYesYes: pages requested with HTTP
Clicking a link to another pageYesYes: that link is the "web"
A video call in a phone's calling appYesNo
An online game sending player movesYesNo
Sending email from a mail appYesNo: mail has its own protocols
Opening a file saved on your own laptop, offlineNoNo
Everything on the Web uses the internet, but plenty of the internet is not the Web.

Beyond the course, as a bonus: you type names like example.com, but packets need numeric IP addresses. The Domain Name System (DNS) is a distributed set of servers that looks up the address for a name, like a phone book. And HTTPS is HTTP with encryption added, which you'll meet in Unit 5. Neither is required by the current CED.

Pause and think
Your house loses internet service, but your laptop still shows a web page you saved last week. Are you using the Web? Are you using the internet?
I thought about it. Show me
Neither. You're opening a file stored on your own laptop. The Web needs the internet to fetch pages from servers, and nothing is being fetched. It's like reading a printout of a page.
Analyze this scenario
A family's home router stops letting web pages load: every browser shows an error. But their video calling app still works, and so does an online game. A student says, "So the internet is working, but the Web isn't." Is that a reasonable conclusion? Explain using the relationship between the internet and the Web.
  1. Notice what still works: the calling app and the game send and receive packets over the internet.
    Why?
    If packets couldn't cross the internet at all, nothing would work.
  2. So the connection itself, and IP routing, are working.
  3. Notice what fails: only the browser, which uses HTTP to request linked pages, the Web.
  4. Conclusion: yes, it's reasonable. The Web is one service that runs on top of the internet, so the Web can fail while other internet services keep working. The reverse is not possible: if the internet failed completely, the Web would fail with it.
    Why?
    That one-way dependency is what the exam is testing: the Web needs the internet, the internet doesn't need the Web.

Answer: Reasonable: other internet services still work, so the internet is up, and only the Web (HTTP pages) is failing. The Web depends on the internet, not the other way around.

Stuck? Get a hint
  1. Which apps still work? Do they use the internet?
  2. Which app fails? What protocol does it use?
  3. The Web runs on the internet, so it can fail on its own.
Check yourself
Which of the following uses the internet but does NOT use the World Wide Web?
  1. AReading a museum's website in a browser
  2. BA browser requesting a page with HTTP
  3. CClicking a link from one web page to another
  4. DA multiplayer game sending players' moves to a game server
Show the answer

D. The game sends packets over the internet without requesting linked pages. The other three are all the Web: pages and links fetched with HTTP.

  • The World Wide Web is a system of linked pages, programs and files. It runs on the internet.
  • HTTP is the Web's protocol: a browser requests a page, a server responds.
  • Email apps, video calls and online games use the internet without being the Web.