Un case study sullo sviluppo di Progressive Web App (PWA) con WordPress. Esempi e best practices su come creare temi offline-first e come aggiungere funzionalità delle PWA a temi esistenti.
Andriy Frankevych ● Back end web developer @ facile.it ● @alsoknownasdrew on GitHub, Twitter, Telegram etc... ● 3+ years of experience with WordPress ● https://t.me/webdevhub
PWA ARE: Reliable ● Load instantly ● No downasaur even when offline Fast ● Respond quickly to user interactions ● Smooth animations ● No janky transitions Try them on https://pwa.rocks/ Engaging: ● Home screen launch ● Full screen experience ● Access to native features like push notifications, payments API(full list on https://whatwebcando.today/)
Service Worker ● Javascript file executed on a separate thread ● Acts like a proxy between your client(browser) and network ● Can intercept fetch events ● Have access to IndexedDB and Cache API
A2HS Requirements ● The web app is not already installed ● The user has interacted with the domain for at least 30 seconds ● Includes a web app manifest that includes ● Served over HTTPS (required for service workers) ● Has registered a service worker with a fetch event handler
PWA are Reliable: ● Fast load and first contentful and meaningful paint ● Website responds with status 200 when offline Fast: ● Client side Ajax routing ● Content transitions and animations on user interaction Engaging: ● A2HS prompt ● Lunch from home and standalone fullscreen experience