GCSE · Computer Science · OCR · Spec J277

Web servers and clients

A shop page tells you there are 7 left in stock. Your phone did not count them. So where did that number come from?

Step through it

One shop page, from tap to screen

A made-up online shop. Press Next to follow one visit: who sends what, where the code runs, and when.

Before you press Next: this page will end up showing '7 left'. Where do you think that figure gets looked up: on your phone, or somewhere else?

Client→Web server→Database
Sends=Request for the product pageDevice=Your phone

Output

Request: client to web server

Step 1: You tap a product in the shop. Your phone is the client, so it sends a request over the internet to the web server that hosts the shop.

1 / 6

Press Next to follow the visit one step at a time. The shop and its figures are made up.

Step 1 of 6: You tap a product in the shop. Your phone is the client, so it sends a request over the internet to the web server that hosts the shop..

Where does the code run?

Client-side processingvsServer-side processing

Same web page, two places for code. Start with where it runs.

Focus

Where it runs

Client-side processing

On the user's device, in their browser. It is usually written in JavaScript.

Server-side processing

On the web server.

The insight

Start here. Once you know where the code runs, the other differences are easier to work out.

When it runs

Client-side processing

It is sent with the web page and runs after the page loads.

Server-side processing

It runs on the web server, and the processed content is then sent to the browser.

What it is used for

Client-side processing

Making pages interactive, for example animations and pop-ups.

Server-side processing

Often creating dynamic web pages.

Databases

Client-side processing

Does not access databases directly.

Server-side processing

Commonly interacts with databases, which helps keep content up to date, for example live product stock or prices.

Who looks after what?

Hosting company or hosting it yourself

Tick where each job belongs. Some belong in both places.

  • A extras hosting companies often provide
  • B jobs you take on if you host your own server
  1. Security
  2. Backups
  3. Technical support
  4. Website builders
  5. Email services
  6. Analytics
  7. Maintenance
  8. Keeping the server switched on at all times

Check your thinking

Where does a website actually live?

Sam opens the school website on a smartphone.

Which idea is closest to what you think right now?
How sure are you?

Your turn

Explain it in your own words

Describe how a client and a web server work together to deliver a web page to a user. [3 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Who asks, who answers, and where the code runs when you open a web page.

What you need to know

  • A client is the device you use to get content or services over the internet, such as a laptop, tablet or smartphone.
  • A web server is a powerful computer that hosts content and services so they can be accessed over the internet.
  • Have a goYour mate waves their phone and says, "Look, I'm the server now!" What should they call the phone instead?

    A client.

    A phone is a device used to access content, which makes it the client. The server is the powerful computer that hosts that content.

  • Hosting is storing a website or online service on a server so it can be reached over the internet. That server is the host.
  • The client sends a request. The web server responds by sending the content or service back to the client.
  • Have a goYou tap a link. Who makes the first move in the exchange, the client or the web server?

    The client. It sends the request.

    The web server responds to a request by sending content back, so the exchange starts with the client.

  • Most websites are hosted by an external web hosting provider, which rents out its own dedicated servers to businesses and individuals.
  • Hosting companies often add other services too: security, website builders, backups, technical support, email services and analytics.
  • Host your own server instead and it is on you: security, backups, technical support, maintenance and keeping it switched on at all times.
  • Have a goYou host your own web server, then switch it off at bedtime to save power. Whose problem is that?

    Yours.

    Hosting your own server puts the responsibility on you, and that includes keeping it on at all times.

  • Large online services such as Google, Meta and Amazon host their own web services, using dedicated data centres.
  • Client-side processing runs code on your device, in your browser, usually written in JavaScript. It makes pages interactive.
  • Server-side processing runs code on the web server before the page is sent. It often creates dynamic pages and commonly uses databases.

The big picture

A client is the device used to access content or services over the internet. A web server is a powerful computer that hosts them, responding when the client sends a request. Hosting means storing a website on a server. Most sites use an external hosting provider; if you host your own server, security, backups, technical support, maintenance and keeping it on are down to you. Code can run client-side, in your browser, or server-side, on the web server before the page is sent.

Key points

1A client asks and a web server answers: the client sends a request and the web server responds with the content or service.
2A website is hosted on a web server. The device you view it on is the client.
3Most sites use an external hosting provider. Hosting your own server makes security, backups, technical support, maintenance and keeping it on your responsibility.
4Client-side code runs in your browser after the page loads. Server-side code runs on the web server before the page is sent.

Worked example

Problem

A cinema's website shows how many seats are left for tonight's film, and it has a banner that animates. Decide where the code behind each one runs, and why.

⚠ Watch out

Thinking a website lives on the device you view it on. It is hosted on a web server. Your device is the client: it requests the site and the web server sends it back.

🧠

Memory hook

Client asks, server answers, browser acts. Server-side code does its bit before the page is sent, client-side code after it arrives.

✓

Check yourself

Cover the page. Talk through what happens from tapping a link to seeing the page, and say which kind of code runs at which end.

Flashcards

(13)
What is a client?
The device used to access content or services using the internet, for example a laptop, tablet or smartphone.
What is a web server?
A powerful computer used to host content and services that can be accessed using the internet.
What is hosting?
Storing a website or an online service on a server so that it can be accessed over the internet.
In hosting, what is the host?
The server or servers where the content and services are served to the client.
How do a client and a web server work together?
The client sends a request to the web server, which responds by sending the content or service back to the client.
Where are most websites hosted?
With an external web hosting provider, which has its own dedicated servers that it rents to businesses and individuals.
Name three extra services a web hosting company often provides.
Any three of: security, website builders, backups, technical support, email services, analytics.
What jobs fall on you if you host your own web server?
Security, backups, technical support, maintenance and keeping the server switched on at all times.
How do Google, Meta and Amazon host their web services?
They host their own, using dedicated data centres to hold the web technologies they need.
What is client-side processing?
Code running on the user's device, in their browser, usually written in JavaScript. It makes pages interactive.
What is server-side processing?
Code running on the web server before the page is sent to the client. It is often used to create dynamic web pages.
Which kind of processing does not access databases directly?
Client-side processing. Server-side processing is the one that commonly interacts with databases.
Is a website stored on the device you view it on?
No. It is hosted on a web server, and your device (the client) requests it.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.