< Back to notes

Browse 12 notes tagged web development.

#web development

ResizeObserver basics: element sizes, boxes, and update boundaries

An element can shrink without the viewport changing. Use a runnable JavaScript example to understand ResizeObserver, content and border boxes, logical axes, hidden elements, cleanup, and resize feedback loops.

IntersectionObserver: visibility, loading, and virtualization are separate jobs

Learn root, rootMargin, threshold, initial notifications, and observer cleanup with small JavaScript examples. Separate infinite-scroll request control from virtualization and its DOM budget.

A retry is not a second attempt: the real boundaries of API idempotency keys

A timeout is not proof of failure. Use operation keys, parameter binding, atomic records, bounded retries, and an outbox to prevent duplicate side effects.

The site is deployed. Why am I still seeing the old version?

Follow a response through browser and CDN caches, understand s-maxage and validators, and connect fingerprinted JavaScript to the HTML that actually requests it.

AbortController: Cancel Stale Work, Not Every Error

AbortController stops work a person has superseded, but cancellation, timeouts, HTTP failures, and server-side effects need different handling. Put controller ownership in the right place first.

Navigation API: A Router Primitive, Not an SPA Mandate

The Navigation API centralises SPA navigation, but only intercept same-origin GETs your app can safely finish. Leave forms, downloads, hash links, external destinations, and unsupported browsers to ordinary navigation.

Speculation Rules: Faster Navigation Must Not Do Things Early

Speculation Rules can speed up the next MPA navigation, but prefetch and prerender have very different costs. Exclude side-effecting URLs, preserve ordinary navigation, then use activation and hit rate to decide whether to expand.

Browser Scheduler: Classify Work Before You Queue It

Scheduler gives the browser a priority hint; it is not a background thread. Keep short UI work synchronous, then choose postTask, yield, or a Web Worker from measured evidence.

<details> Is Disclosure, Not an Accordion System

Native details already handles toggling and keyboard interaction. name can create exclusive panels, but only when that matches content semantics and safe fallback behavior.

Native CSS Carousels Are an Enhancement, Not a Rewrite

CSS Overflow 5 can generate carousel buttons and markers, but it is not Baseline yet. Start with a semantic list, scroll snap, and progressive enhancement before removing JavaScript.

MCP Apps Put UI in Chat, Not in Every Tool

MCP Apps can render dashboards, forms, and visual tools inside AI conversations. The useful boundary is simple: tools execute, views present, and hosts control trust.

View Transitions Make MPAs Smoother, Not SPAs

The View Transition API now covers same-document state changes and page navigation. Here is the minimal approach to fallbacks, shared elements, and reduced motion.