Skip to the content ForoHackers
Log inJoin

Browsers: start here

Browsers
#3423 · · Quote · Report

A web browser is a program that fetches resources from the network, interprets them and draws the result, while running untrusted code from every site you visit. It is a rendering engine, a script engine, a network stack and a security sandbox in one, and understanding it explains most of how the web behaves.

Key concepts

  • Rendering pipeline: parse HTML into a tree, compute styles, lay out boxes, paint, and composite layers.
  • Script engine and event loop: JavaScript runs on one thread, taking turns with rendering and input.
  • Same-origin policy: a page may not freely read data from another origin; this is the core of web security.
  • Storage and cache: cookies, local storage and the HTTP cache keep state between visits.
  • Process isolation: sites and tabs are separated so a failure or an exploit stays contained.

Vocabulary

  • Origin: the combination of scheme, host and port that defines a trust boundary.
  • Engine: the core that renders pages; several browsers can share one.
  • Developer tools: built-in panels to inspect the DOM, network, performance and storage.
  • Reflow: recomputing layout after something changes.

What to study, in order

  1. Open the developer tools on any page and read its elements, network and console panels.
  2. Watch a page load in the network panel, and explain the order of requests and what blocks what.
  3. Read how a browser turns markup into pixels, from parsing to compositing.
  4. Experiment with cookies and the same-origin policy on a test page of your own.
  5. Check how your page behaves in at least two different engines.

Related tags

#http #web-standards #web-performance #web-security

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply