offline-fallback
यह क्या करती है
यह स्किल एक सरल ऑफ़लाइन पेज और service worker सेट करती है, जो पेज लोड न होने पर उसे दिखाता है। यह उन डेवलपर्स के लिए है जो PWA या अस्थिर नेटवर्क पर चलने वाली साइटें बनाते हैं।
कब इस्तेमाल करें
- ✓जब आप एजेंट से किसी वेबसाइट या प्रोग्रेसिव वेब ऐप में ऑफ़लाइन सपोर्ट जोड़वाएँ।
- ✓जब अस्थिर कनेक्शन वाले विज़िटरों को ब्राउज़र का डिफ़ॉल्ट एरर पेज दिखे और आप अपना ब्रांडेड विकल्प चाहें।
- ✓जब आप service worker सेट कर रहे हों और चाहें कि वह विफल पेज अनुरोधों को सलीके से संभाले।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/offline-fallback/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरी साइट में एक कस्टम ऑफ़लाइन पेज जोड़ सकते हैं, ताकि खराब इंटरनेट वाले विज़िटरों को कुछ उपयोगी दिखे?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक स्वतंत्र ऑफ़लाइन पेज बनाता है जो बाहरी संसाधनों के बिना लोड होता है। वह service worker को इंस्टॉलेशन के दौरान वह पेज सेव करने और पेज नेविगेशन विफल होने पर दिखाने के लिए सेट करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
ऑफ़लाइन पेज खुद अकेला क्यों काम करे?
स्किल कहती है कि वह नेटवर्क अनुरोधों पर निर्भर नहीं होना चाहिए, क्योंकि ऑफ़लाइन होने पर वही विफल होते हैं।
क्या ऑफ़लाइन पेज इमेज और स्क्रिप्ट पर भी लागू होता है?
नहीं। स्किल कहती है कि फ़ॉलबैक केवल पेज नेविगेशन अनुरोधों पर दिखाया जाए, सब-रिसोर्स पर नहीं।
क्या यह सेव किया हुआ कंटेंट दिखा सकता है?
हाँ। स्किल सेव किया हुआ कंटेंट या उपयोगी कार्य दिखाने की बात करती है, जैसे फ़ॉर्म को बाद के लिए कतार में रखना।
जानकारी
लेखक का मूल विवरण
Use when adding PWA capabilities, implementing a service worker, or improving the experience for users on unreliable network connections.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2957
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।