Next.js Discord

Discord Forum

How to implement offline-first PWA in Next.js 15?

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
Hi everyone!

I’ve set up my Next.js 15 project as a PWA (manifest and service worker are working), but I can’t get the offline-first behavior to work.

When I go offline, the app shows a network error instead of serving cached content or a fallback page.

I’m using the App Router, and I’m not using plugins like next-pwa.

How can I configure the service worker to serve cached pages or an offline fallback with Next 15?

Any help or tips would be appreciated!

0 Replies