A web browser is the program that fetches web pages, draws them on screen and keeps each site walled off.
This guide is for anyone who uses a browser every day and wonders what happens inside. You do not need technical skills. It also helps if you are starting to hear about AI tools that drive a browser for you.
In short
- When you type a web address, the browser finds the site, connects to it securely and downloads the page.
- It then turns code into the page you see, step by step.
- Each site is kept apart by a rule called the same-origin policy, and often by running in its own walled-off process.
- These walls limit the harm a bad page can do, but they do not stop you being tricked into typing your password.
What you will learn
- Follow the steps from typing an address to seeing a page.
- Explain what a sandbox and site isolation do in plain words.
- Describe what the same-origin policy protects.
- Know what a browser cannot protect you from.
- Drawing the page (rendering)
- turning a page's code into the text and pictures on screen.
- Walled-off space (sandbox)
- a locked area where page code runs with very few rights.
- A site's home address (origin)
- the protocol, host name and port that together identify a website.
What is a web browser?
Think of a block of flats with a strict caretaker. Each website gets its own flat. Visitors can come and go, but no tenant can walk into a neighbour's flat.
A browser fetches pages from the internet and shows them to you. Behind the scenes it runs code from every site you visit. To keep that safe, it keeps sites apart. The same-origin policy limits how a page from one site can interact with data from another [2]. Two addresses share an origin only if the protocol, host and port all match [2].
Where the comparison stops working: a caretaker can see who is knocking. A browser cannot tell a fake bank page from the real one by looks alone. It keeps sites apart, but it cannot stop you choosing to trust the wrong one.
Some AI tools now drive a browser for you. They rely on the same walls, so it helps to know how they work.
Why does it matter?
The browser is where you read email, bank and sign in to work tools. Its walls decide how much one bad page can reach.
If you browse at home
What could happen: a bad page tries to read your webmail in another tab.
Check this: keep your browser up to date so its walls stay strong.
If you use work apps in a browser
What could happen: a fake sign-in page collects your password. The browser's walls do not stop this.
Check this: look at the address bar before typing a password.
If your team tries AI browser tools
What could happen: an AI agent, a non-human identity that acts in the browser, follows hidden instructions on a page.
Check this: limit which sites and accounts the agent can reach.
What does it look like?
Here is a made-up view of three open tabs and how the browser keeps them apart.
Example only. All values are made up.
Tab 1: https://mail.example.com origin A process 0001 (1) Tab 2: https://shop.example.net origin B process 0002 (2) Tab 3: http://mail.example.com origin C process 0003 (3) Rule: B may not read A's data (FAKE log) (4) Each process: sandboxed, few rights (5)
- A webmail tab. Its origin is the protocol, host and port together.
- A different site, so a different origin and its own process.
- Same host as tab 1 but a different protocol, so a different origin.
- In a real file, this line would contain a note that the same-origin policy kept the shop page from reading the mail page.
- Each process runs in a sandbox with very limited rights.
Why this is risky: if a bug lets one tab break out of its wall, it could reach data from another site.
The safer way: keep the browser updated, so known bugs in those walls are fixed.
How does it work?
- Find the site. The browser asks DNS for the server's IP address [1].
- Connect securely. For HTTPS, a TLS handshake sets up encryption and checks the server [1].
- Ask for the page. The browser sends a request, and the server usually returns an HTML file [1].
- Build the page. The browser reads the HTML and CSS, works out where everything goes, then paints it on screen [1].
- Run the scripts. JavaScript makes the page interactive. Most of it runs on the page's main thread [1].
- Keep it walled off. Page code runs in a sandbox, a process with very few rights [4].

Chrome adds another wall called site isolation. Pages from different websites always go into different processes [3]. It has been on by default for all sites on desktop since Chrome 67 [3].
Why the extra wall? Some attacks, such as Spectre, can read memory inside a process [3]. If each site has its own process, there is less for a bad page to find.
The sandbox follows the idea of least privilege: give code only the rights it needs [4].
A worked example
This story is made up to show the idea.
Petra Thorne runs a small design studio. She keeps her webmail open in one tab all day. One afternoon she clicks a link in a forum and lands on a strange page full of adverts.
She worries the page can read her email. A friend who works in IT explains what happens behind the scenes.
The forum page and her webmail have different origins. The same-origin policy stops scripts on one from reading data on the other. Her browser also runs each site in its own walled-off process. So the advert page cannot simply look into her mail tab.
Then her friend points out the limits. A few days earlier, Petra had got an email saying her mailbox was full. She clicked the link and typed her password on a page that looked like her webmail.
The browser's walls did nothing there. Petra had chosen to give her password to a fake site. No wall was broken.
Petra changes her email password straight away and turns on two-step sign-in. She also sets her browser to update itself, so fixes for its walls arrive quickly. From now on, she opens her webmail from a bookmark instead of from links in emails.
Petra learned that the browser protects sites from each other, but she has to protect herself from fake pages.
Myths and mistakes
| What people think | What is true |
|---|---|
| Any website can read my other tabs. | The same-origin policy stops one site's scripts reading another site's data, such as your webmail [2]. |
| The padlock means a site is safe. | HTTPS encrypts the connection and checks the server [1]. A fake site can have a padlock too. |
| The sandbox means the browser cannot be attacked. | It limits what code can do [4]. Bugs still happen, which is why updates matter. |
| Two pages on the same website name always share an origin. | The protocol and port must match too [2]. http and https versions are different origins. |
| An AI tool using my browser is just like me clicking. | It acts with your signed-in sessions but may follow instructions hidden in a web page, a risk OWASP calls indirect prompt injection [5]. Give it only the access it needs. |
What can I do this week?
- Check that your browser updates itself, and restart it when it asks.
- Open important sites, such as your bank, from a bookmark.
- Look at the address bar before you type any password.
- Close tabs for sites you have finished with, especially signed-in ones.
Checklist
- I can describe the steps from typing an address to seeing a page.
- I know that each site runs inside a walled-off sandbox.
- I know the same-origin policy keeps sites from reading each other's data.
- I know a padlock does not prove a site is genuine.
- My browser updates itself and I restart it when asked.
- I check the address before typing a password.
- I limit what AI browser tools can reach.
Common questions
What happens when I type a web address?
The browser looks up the site's IP address with DNS, connects to the server, and sets up encryption for HTTPS. It then asks for the page, builds it from HTML and CSS, paints it on screen, and runs any scripts.
What is a browser sandbox?
A sandbox is a walled-off space where page code runs with very few rights. If a page contains harmful code, the sandbox limits what it can change on your computer. It follows the idea of giving code only the rights it needs.
What is site isolation?
Site isolation puts pages from different websites into separate processes. Chrome turned it on for all sites on desktop from version 67. It makes it harder for a bad page to read another site's data from shared memory.
What can a browser not protect me from?
It cannot stop you choosing to trust a fake page. If you type your password into a lookalike site, no wall has been broken. Checking the address, using bookmarks and using a password manager help with that.
Are AI browser agents covered by the same walls?
Partly. The agent's pages run in the same sandboxes. But the agent acts with your signed-in sessions and reads page text as instructions, so a page can try to steer it. Limit the sites and accounts it can use.
Where next?
Ready for the detail? Read the practitioner guide: Browser and Computer-Use Agent Guide. It covers how AI agents that drive a browser are secured, building on the browser walls described here.
Also useful:
- How the Web Works for Beginners
- Browser Security for Beginners
- How DNS Works for Beginners
- Computer Use and Browser Agents for Beginners
Related NHI Mgmt Group resources: Browser Security Hardening Guide, How TLS Works Guide and Browser Extensions for Beginners.
Key terms
- Browser sandbox
- A walled-off space where web page code runs with very limited rights.
- Site isolation
- A browser feature that puts pages from different websites in separate processes.
- Same origin policy
- A browser rule that stops a script from one website reading data from another website.
- HTTPS
- The secure version of the web's main protocol. It encrypts traffic and checks the server.
- DNS
- The internet's address book, which turns names like example.com into IP addresses.
- Browser agent
- An AI tool that uses a web browser on a person's behalf. It is a non-human identity.
Sources and further reading
- MDN Web Docs, Mozilla, "How browsers work". https://developer.mozilla.org/en-US/docs/Web/Performance/Guides/How_browsers_work (accessed 30 Nov 2026).
- MDN Web Docs, Mozilla, "Same-origin policy". https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy (accessed 30 Nov 2026).
- The Chromium Projects, "Site Isolation". https://www.chromium.org/Home/chromium-security/site-isolation/ (accessed 30 Nov 2026).
- The Chromium Projects, "Sandbox" (design document). https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md (accessed 30 Nov 2026).
- OWASP, "LLM01:2025 Prompt Injection", OWASP Top 10 for LLM Applications 2025. https://genai.owasp.org/llmrisk/llm01-prompt-injection/ (accessed 30 Nov 2026).