Offline fallback

From thedaviddias/Front-End-Checklist · View interactive version

Offline fallback is an AI agent skill from the GitHub repository thedaviddias/Front-End-Checklist. Use when adding PWA capabilities, implementing a service worker, or improving the experience for users on unreliable network connections.

How to use this skill

Skill file

Provide an offline fallback page

The browser's default offline error screen ("No internet connection") is confusing and completely outside your brand. A custom offline page maintains the user experience, reinforces trust, and can surface cached content or useful actions — such as enabling users to continue reading a cached article or queuing a form submission for later.

Quick Reference

Check

Check whether the site shows a custom offline fallback page when the network is disconnected and a navigation request cannot be fulfilled.

Fix

Create a self-contained /offline page and configure the service worker to pre-cache it and serve it for failed navigation requests.

Explain

Explain how a service worker can intercept failed network requests and return a cached offline fallback page to the user.

Code Review

Review the service worker fetch handler and the offline page markup. Verify the offline page is pre-cached at install time, that it does not depend on external resources, and that the fallback is only served for navigation requests (not sub-resources).


For full implementation details, code examples, and framework-specific guidance,

see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/offline-fallback

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.