offline-fallback
What it does
This skill sets up a simple offline page and a service worker that shows it when a page cannot load. It is for developers building progressive web apps or sites used on unreliable networks.
When to use it
- ✓When you ask the agent to add offline support to a website or progressive web app.
- ✓When visitors on unreliable connections see the browser's default error page and you want a branded alternative.
- ✓When you are setting up a service worker and want it to handle failed page requests gracefully.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/offline-fallback/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you add a custom offline page to my site so visitors with bad internet see something useful?”
5 new skills a week. 1 minute to read.
How it works
The agent creates a self-contained offline page that loads without outside resources. It sets the service worker to save that page during installation and to show it when a page navigation fails.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
- Create a minimal /offline HTML page that works without any network requests
- Pre-cache the offline page during the service worker install event
- Intercept failed navigation requests and serve the offline page instead
- Include helpful guidance so users know what to do while offline
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
FAQ
Why must the offline page work on its own?
The skill says it should not depend on network requests, since those are what fail when the user is offline.
Does the offline page apply to images and scripts too?
No. The skill says the fallback should only be served for page navigation requests, not sub-resources.
Can it show cached content?
Yes. The skill mentions surfacing cached content or useful actions, such as queuing a form for later.
Details
Original description by the author
Use when adding PWA capabilities, implementing a service worker, or improving the experience for users on unreliable network connections.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2957
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.