Client vs Server
The two sides of every web interaction
⏱ Est. ~4 min
01 · Read
Every time you use a website or app, there are always two sides to the conversation: - Client — your browser or app, running on your device. It's responsible for putting things on the screen and reacting to your clicks and taps. - Server — a computer somewhere else. It stores data, processes requests, and sends results back.
They work together: the client handles what you see, the server handles what's happening behind the scenes.
💡 Picture thisImagine a restaurant. You (the client) sit at the table, look at the menu, and order. The kitchen (server) receives your order, makes the food, and sends it out. You don't walk into the kitchen, and the kitchen doesn't sit at your table. Each side does its own job.
Key points
- Client = your device (browser, mobile app). Handles display and interaction.
- Server = a remote computer. Handles data storage, logic, and processing.
- Client sends a request ("I want this page"), server sends a response ("here are the files")
- Some code runs on the client (JavaScript in the browser), some on the server (processing your login)
02 · Drag to sort
For each action, decide: does this happen on the Client (your browser) or the Server (a remote computer)?
(This section is interactive — please enable JavaScript.)
03 · Quiz
Using the restaurant analogy, what does the "server" correspond to?
- The menu
- The table you sit at
- Other customers
- The kitchen that makes the food
04 · Quiz
JavaScript makes a button on a web page change color. Where does this code run?
- On the client (your browser)
- On the server
- In the database
- On the DNS server
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.