Blog
Notes on data structures & algorithms, system design, and things I learn along the way.
Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→Text responses shrink by 5–20× when compressed, and browsers ask for it on every request. How Accept-Encoding and Content-Encoding negotiate a format, how gzip, Brotli and zstd compare, static versus on-the-fly compression, what not to compress, and the one security caveat.
What each part of a URL means, which part the server never sees, how percent-encoding works (and why + sometimes means a space), when to use encodeURIComponent versus encodeURI, and why the URL and URLSearchParams classes beat string concatenation — including for security.
Browsers have a built-in component model: custom elements with lifecycle callbacks, the shadow DOM for encapsulated markup and styles, slots for composition, and ways to theme from outside. How each part works, how they fit with frameworks, and when native components are the right choice.
Images are usually the heaviest part of a page. How srcset and sizes let the browser download the right resolution for each screen, when to use <picture> for formats and art direction, how width and height prevent layout shift, and why the hero image should never be lazy-loaded.
How screen readers, keyboards and other assistive technology see a page through the accessibility tree — and the handful of habits that cover most of it: semantic HTML, names for every control, keyboard and focus, enough contrast, and ARIA only when HTML runs out.
Cross-site request forgery makes your browser send an authenticated request you never intended — because cookies go along automatically. How the attack works, why it doesn't need to read the response, and the defences that stop it: SameSite cookies, CSRF tokens, Origin checks, and safe GET requests.
A JSON Web Token is a signed, readable bundle of claims. How the header, payload and signature fit together, how verification works without a database lookup, the verification mistakes that have broken real systems, and the hard part: expiry, revocation, and where to store the token.
How an app gets permission to act on your behalf at another service without ever seeing your password. The authorization code flow, why PKCE protects the code in transit, what state, scopes, access and refresh tokens are for, and how OpenID Connect adds login on top.
A service worker is a script that sits between your page and the network and can answer requests itself. How it's installed and updated, the main caching strategies — cache-first, network-first, stale-while-revalidate — and the lifecycle details that trip everyone up.
Three numbers that describe how a page feels to a real user: how fast the main content appears, how quickly it responds, and how much it jumps around. What each one measures, the thresholds that count as good, and the fixes that move them.
20 posts tagged Web · page 1 of 2