JavaScript Internals (521 Qs)•Part 3: DOM, Event Flow, Timers & Browser APIs (104 - 173)
What are PWAs
Progressive web applications (PWAs) are a type of mobile app delivered through the web, built using common web technologies including HTML, CSS and JavaScript. These PWAs are deployed to servers, accessible through URLs, and indexed by search engines.
Practical Code Example
javascript
// Progressive Web Apps (PWAs) combine web reach with native app capabilities:
// 1. Web App Manifest (manifest.json for installability)
// 2. Service Worker (sw.js for offline caching & background sync)
// 3. HTTPS secure origin
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js');
}