Cursor Pagination vs Offset Pagination: How to Page Through an API Properly
When to use cursor pagination or offset pagination in an API: why large offsets get slow, why pages repeat or skip items, keyset queries in SQL, opaque cursors, a Next.js route handler, response shapes, going backwards, and the mistakes I see most.
Skeleton Screens vs Spinners vs Progress Bars: When to Use Each
How I choose between skeleton screens, spinners and progress bars: what each one is for, how long to wait before showing a loader, matching skeletons to the real layout to avoid layout shift, aria-busy and live regions, reduced motion, and skeletons with React Suspense and Next.js loading.js.
SPA Focus Management: How to Fix Route Changes in React and Next.js
Client-side navigation in React and Next.js doesn’t reset focus or announce the new page. Here’s how SPA focus management works: focusing the h1 with tabIndex -1, what the Next.js route announcer does and doesn’t do, aria-live regions, skip links and testing with Playwright.
React Hydration Error in Next.js: What Causes It and How to Fix Each One
A hydration error means the browser’s first render didn’t match the server HTML. Here’s what causes it in React and Next.js, from dates and typeof window to localStorage and bad HTML nesting, and the fix I use for each one.
Next.js Middleware and Proxy: Auth Redirects, Rewrites, and Matchers Done Right
How I use Next.js Middleware (Proxy in Next.js 16) for auth redirects, safe return paths, rewrites, matchers, cookies and headers – without breaking CSS.
Cache-Control Headers in 2026: Caching Rules That Make Repeat Visits Instant
How I set Cache-Control headers on client sites: hashed assets cached for a year, HTML revalidated with ETags, private pages kept out of shared caches, and CDN rules that just work.
JSON-LD Structured Data in 2026: Schema Markup That Still Earns Rich Results
How I add JSON-LD structured data to client sites in 2026: the schema types that still earn rich results, one connected @graph, safe Next.js and WordPress output, and testing in CI.
Speculation Rules API in 2026: Prerender the Next Page Before the Click
How I use the Speculation Rules API on client sites: prefetch vs prerender, document rules, eagerness levels, safe exclusions, prerender-aware analytics, and WordPress 6.8 speculative loading.
Idempotency Keys in 2026: Stop Duplicate Payments and Double Submits in Your API
Learn how idempotency keys stop duplicate payments and double submits: the Idempotency-Key header, Postgres and Redis storage, 409 and 422 handling, safe retries, and webhook dedupe.
React Server Actions in 2026: Forms and Mutations Without Extra API Routes
Practical Next.js Server Actions for client sites in 2026: progressive forms, useActionState, validation, auth cookies, revalidatePath/Tag, CSRF, and when to use Route Handlers instead.
Content Security Policy in 2026: Lock Down XSS Without Breaking Your Scripts
Practical CSP in 2026: report-only rollout, nonces vs hashes vs strict-dynamic, WordPress and Next.js headers, GTM, and a checklist to stop XSS without breaking scripts.