Open a Website
A URL in the address bar to something a person can read and use. Almost all of this happens before a single line of your application code executes, which is why so much of what makes a page feel slow is not in your application code at all.
Read this once end to end and the rest of the domain stops being a pile of unrelated advice. Why a stylesheet in the head blocks the first paint, why a script without defer stops the parser, why an image with no dimensions moves the paragraph you were reading — every one of those is a consequence of a step below, not a rule to memorise.
- One layer deeper
The origin is decided here, and it decides everything downstream: which cookies attach, which
localStorageand IndexedDB the document opens, which service worker may intercept it, which permission grants it inherits. Move a page fromhttptohttps, or from a bare domain to a subdomain, and nothing was deleted — the document simply belongs to a different origin and cannot see the old one's storage.What can go wrong here- — A redirect chain before the HTML: each hop is a full round trip during which no parsing can begin.
- — A scheme or host change that silently orphans storage, cookies and a registered service worker.
- — A URL that carries state the application then argues with — a shared link restores a filter that the client overwrites on mount.
The other two walks
Same page, different question. Each one crosses the loop at a different point.