मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)75k · #2957

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/offline-fallback/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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.

repo: thedaviddias/Front-End-Checklist

लोकप्रियता

GitHub स्टार
75k
रैंकिंग में स्थान
#2957
लाइसेंस
MIT
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills