Progressive Web Apps Interview Questions Hindi mein

Progressive Web Apps: Offline, Installable Web Apps कोर्स के 16 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।

मॉड्यूल 1: शुरुआत

1. PWA के तीन pillars कौन से हैं?

  1. Server-side rendering, database, API
  2. Reliable (offline), Fast (instant load), Engaging (app-like)
  3. JavaScript, CSS, HTML
  4. Server-side rendering, SQL, REST
जवाब देखें

जवाब: Reliable (offline), Fast (instant load), Engaging (app-like)

PWAs को reliability, speed और engagement से define किया जाता है—वे offline काम करते हैं, instantly load होते हैं और native लगते हैं।

पाठ: Progressive Web Apps क्या हैं?

मॉड्यूल 2: Core Foundations

2. manifest.json में 'display' field क्या control करता है?

  1. Screen brightness और contrast
  2. कौन सी languages को support करना है
  3. Launch होने पर app कैसे appear करता है (fullscreen, standalone, minimal-ui, browser)
  4. Service worker cache का size
जवाब देखें

जवाब: Launch होने पर app कैसे appear करता है (fullscreen, standalone, minimal-ui, browser)

'display' field installed app के UI को determine करता है—standalone इसे पूरी तरह native बनाता है।

पाठ: Web App Manifest File

मॉड्यूल 3: Core PWA Features

3. Network-first caching कब use करनी चाहिए?

  1. Static assets जैसे images और fonts के लिए
  2. केवल old browsers के लिए
  3. केवल video streaming के लिए
  4. HTML pages और frequently updated content के लिए
जवाब देखें

जवाब: HTML pages और frequently updated content के लिए

Network-first उस content के लिए ideal है जो अक्सर बदलता है और freshness चाहता है।

पाठ: Network-first Pattern

4. Stale-while-revalidate का मुख्य लाभ क्या है?

  1. Users को instant response देना जबकि background में fresh data update हो
  2. हमेशा newest content को serve करना
  3. Server load को completely reduce करना
  4. Offline writes की गारंटी
जवाब देखें

जवाब: Users को instant response देना जबकि background में fresh data update हो

यह strategy speed (instant cache) और freshness (background fetch) को balance करता है।

पाठ: Stale-while-revalidate

5. Workbox precaching क्या करता है?

  1. install के दौरान versioned build assets cache करता है
  2. Cache को encrypt करता है
  3. Service worker बंद करता है
  4. Network requests block करता है
जवाब देखें

जवाब: install के दौरान versioned build assets cache करता है

Precaching assets पहले से रखता है और revision बदलने पर उन्हें अपडेट करता है।

पाठ: Workbox: बिना boilerplate के Caching

मॉड्यूल 5: Visual Design

6. Manifest.json में 'theme_color' क्या control करता है?

  1. पूरे app का background color
  2. Android पर browser के address bar और system chrome का color
  3. Light और dark modes के लिए color scheme
  4. App का font size
जवाब देखें

जवाब: Android पर browser के address bar और system chrome का color

theme_color Android पर browser UI को आपके app की branding से match करने के लिए customize करता है।

पाठ: App Theming

मॉड्यूल 7: Testing & Debugging

7. Chrome DevTools में आप service workers को कहाँ inspect कर सकते हैं?

  1. Sources tab → Scripts
  2. Console tab → Messages
  3. Application tab → Service Workers
  4. Elements tab → Styles
जवाब देखें

जवाब: Application tab → Service Workers

Application tab service worker status, cache inspection और lifecycle control provide करता है।

पाठ: PWAs को Debug करना

मॉड्यूल 10: Interview Prep

8. PWA में service worker का मुख्य उद्देश्य क्या है?

  1. User interface को render करना
  2. User authentication tokens को store करना
  3. TypeScript को JavaScript में compile करना
  4. Network requests को intercept करना, offline functionality को enable करना और caching को handle करना
जवाब देखें

जवाब: Network requests को intercept करना, offline functionality को enable करना और caching को handle करना

Service workers background scripts हैं जो requests को intercept करते हैं, caches को manage करते हैं और offline support को enable करते हैं।

पाठ: PWA Interview Questions

9. कौन-सी file browsers को PWA install और display करना बताती है?

  1. package.json
  2. robots.txt
  3. manifest.json
  4. sitemap.xml
जवाब देखें

जवाब: manifest.json

Web app manifest में name, icons, start_url और display mode होता है।

पाठ: PWA Interview Questions

10. Service worker (localhost के अलावा) कहाँ से परोसा जाना चाहिए?

  1. Any HTTP page
  2. A file URL
  3. A USB drive
  4. HTTPS
जवाब देखें

जवाब: HTTPS

Service workers को secure context चाहिए।

पाठ: PWA Interview Questions

11. Versioned static assets के लिए कौन-सी strategy उपयुक्त है?

  1. Cache-first
  2. Network-only
  3. No caching
  4. Random
जवाब देखें

जवाब: Cache-first

Fingerprinted assets कम बदलते हैं, इसलिए cache से परोसना सबसे तेज़ है।

पाठ: PWA Interview Questions

12. install में event.waitUntil() क्या करता है?

  1. Skips the event
  2. Keeps the event alive until a promise settles
  3. Stops the worker
  4. Clears the cache
जवाब देखें

जवाब: Keeps the event alive until a promise settles

यह सुनिश्चित करता है कि event खत्म होने से पहले caching पूरी हो।

पाठ: PWA Interview Questions

13. बड़े structured offline data को कौन-सा API रखता है?

  1. localStorage only
  2. Cookies
  3. IndexedDB
  4. window.name
जवाब देखें

जवाब: IndexedDB

IndexedDB structured और बड़े datasets को asynchronously संभालता है।

पाठ: PWA Interview Questions

14. Push permission कब माँगनी चाहिए?

  1. Immediately on page load
  2. Never
  3. On every click
  4. After the user shows interest, in context
जवाब देखें

जवाब: After the user shows interest, in context

संदर्भ के अनुसार prompts की स्वीकृति कहीं ज्यादा होती है।

पाठ: PWA Interview Questions

15. नया service worker जल्दी मिलने में कौन-सी header setting मदद करती है?

  1. Cache-Control: no-cache on sw.js
  2. Cache-Control: max-age=31536000 on sw.js
  3. Expires: never
  4. Set-Cookie
जवाब देखें

जवाब: Cache-Control: no-cache on sw.js

Cached sw.js updates में देरी कर सकता है।

पाठ: PWA Interview Questions

16. PWAs के लिए feature detection क्या है?

  1. Detecting viruses
  2. Checking an API exists before using it
  3. Compressing images
  4. Installing plugins
जवाब देखें

जवाब: Checking an API exists before using it

जैसे 'serviceWorker' in navigator पुराने browsers को चलने देता है।

पाठ: PWA Interview Questions

← कोर्स पर वापस जाएँ