
Content Security Policy in Next.js: Static Pages, Nonces, and Real‑World Trade‑Offs
Plan Content Security Policy in Next.js with static pages, nonces, third‑party scripts, headers, frames, previews, and incremental deployment safely.
Articles
Next.js is an open‑source, React‑based web development framework by Vercel that enhances Node.js for creating fast, scalable web applications. It combines server‑side rendering (SSR) and static site generation (SSG) with dynamic routing, API routes, automatic code splitting, and support for React Hooks and TypeScript.
Below you will find a subset of articles from my blog specifically about Next.js. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are twenty‑eight collected together for you below.

Plan Content Security Policy in Next.js with static pages, nonces, third‑party scripts, headers, frames, previews, and incremental deployment safely.

How to vet a senior Next.js developer for replatforming, recovery, SEO, performance, CMS, Vercel, and production debugging work.

React developer vs. Next.js developer explained through production concerns: rendering, routing, caching, SEO, deployment, CMS data, and debugging.

Next.js gives us two ways to handle back‑end logic: API Routes and Server Actions. Here, I clearly explain when to choose each approach for the best results.

React performance work is often about avoiding repeated effort. This guide looks at memoisation, browser caching, and smarter data‑fetching choices.


How ISR improves Next.js performance by mixing static speed with controlled freshness, and where it fits best over fully dynamic rendering for changing content.

Build a headless CMS‑powered Next.js site with content modelling, fetch layers, mapped front‑end shapes, preview, rendering choices, and scale cleanly.

Multi‑tenant applications serve multiple customers from a single codebase. Here, I walk through building a scalable multi‑tenant web application using Next.js.

When you set up a custom domain in Vercel, the default `vercel.app` subdomain still serves your site, which can lead to duplicate content. Here's how to fix it.

Middleware in Next.js provides a straightforward way to protect routes and manage user authentication. Here, I show how to implement effective route protection.

Next.js vs. Remix compared properly, across routing, data loading, mutations, caching, and the architectural trade‑offs teams actually feel in production.

Caching strategies for data fetching in Next.js, including force‑cache, revalidation, stale data trade‑offs, and the debugging traps teams hit in production.

Whilst replatforming an app, I came across this limitation in Next.js: you cannot (easily) access search parameters in an SSR layout. Here, I share my solution.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

Websites have not been set‑and‑forget for a long time now, and without the technical know‑how to update a static site, CMSes are a key part of web development.
Fix window is not defined in Gatsby or Next.js by understanding SSR, guarding browser globals, lifecycle timing, dynamic imports, and third‑party modules.

Preview Mode in Next.js explained with a headless CMS, draft content workflows, preview cookies, and how editors can see unpublished pages safely.