| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
| informatique:progressive_web_app_pwa [07/07/2025 13:08] – [BadJwtToken] cyrille | informatique:progressive_web_app_pwa [12/07/2025 10:53] (Version actuelle) – ↷ Liens modifiés en raison d'un déplacement. 47.128.36.91 |
|---|
| * [[https://github.com/Minishlink/web-push-php-example|Minishlink/web-push-php-example]] a complete example with html+JS frontend and php backend using ''web-push-php'' | * [[https://github.com/Minishlink/web-push-php-example|Minishlink/web-push-php-example]] a complete example with html+JS frontend and php backend using ''web-push-php'' |
| * [[https://github.com/laravel-notification-channels/webpush|Web Push Notifications Channel for Laravel]] | * [[https://github.com/laravel-notification-channels/webpush|Web Push Notifications Channel for Laravel]] |
| | * https://framagit.org/Cyrille37/webpush-demo/-/tree/main |
| | |
| |
| ===== Online démos ===== | ===== Online démos ===== |
| |
| |
| mine: [[/app/le_saviez-vous_sur_wikipedia]] | mine: [[app:croustiwiki]] |
| |
| * App Directories | * App Directories |
| * librairie orientée mobile, à essayer absolument ;-) | * librairie orientée mobile, à essayer absolument ;-) |
| * [[https://github.com/Minishlink/pwa-qr-code-scanner|pwa-qr-code-scanner]] Lightweight progressive web app for scanning QR codes offline. Par l'auteur de [[https://github.com/web-push-libs/web-push-php|web-push-libs/web-push-php]] | * [[https://github.com/Minishlink/pwa-qr-code-scanner|pwa-qr-code-scanner]] Lightweight progressive web app for scanning QR codes offline. Par l'auteur de [[https://github.com/web-push-libs/web-push-php|web-push-libs/web-push-php]] |
| | * OsmApp https://github.com/zbycz/osmapp/ https://osmapp.org/ |
| | |
| |
| ===== Techno ===== | ===== Techno ===== |
| ==== Installation ==== | ==== Installation ==== |
| |
| Pour installer un PWA sans passer par une compilation et publication sur un magasin d'application: "installer sur l'écran d'accueil". | Pour installer un PWA sans passer par une compilation et publication sur un magasin d'application: "installer sur l'écran d'accueil" aka [[/glossaire/A2HS|A2HS]]. |
| |
| 😩 L'event ''beforeinstallprompt'' n'est pas implémenté par Safari on iOS ni Firefox for Android -> [[https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent#browser_compatibility|MDN browser_compatibility]] | 😩 L'event ''beforeinstallprompt'' n'est pas implémenté par Safari on iOS ni Firefox for Android -> [[https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent#browser_compatibility|MDN browser_compatibility]] |
| Voluntary Application Server Identification (VAPID) for Web Push [[rfc>8292]] [[rfc>9749]] | Voluntary Application Server Identification (VAPID) for Web Push [[rfc>8292]] [[rfc>9749]] |
| |
| * La **page de démo** https://simple-push-demo.vercel.app/ explique bien les différents éléments | * **page de démo** |
| | * https://simple-push-demo.vercel.app/ explique bien les différents éléments |
| | * https://tests.peter.sh/notification-generator/#actions=3 |
| * [[https://pqvst.com/2023/11/21/web-push-notifications/|Demystifying Web Push Notifications]] | * [[https://pqvst.com/2023/11/21/web-push-notifications/|Demystifying Web Push Notifications]] |
| * [[https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers|Sending web push notifications in web apps and browsers]] by Apple | |
| |
| * Mozilla / Firefox | * Mozilla / Firefox |
| * [[https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers|Sending web push notifications in web apps and browsers]] (developer.apple.com) | * [[https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers|Sending web push notifications in web apps and browsers]] (developer.apple.com) |
| * [[https://developer.apple.com/documentation/usernotifications/setting-up-a-remote-notification-server|Setting up a remote notification server]] | * [[https://developer.apple.com/documentation/usernotifications/setting-up-a-remote-notification-server|Setting up a remote notification server]] |
| | * Les notifs fonctionnent très bien (après A2HS), même mieux qu'avec Chrome ou Firefox car elles apparaissent sur l'écran vérouillé. Par contre Webkit (Safari) nettoie automatiquement toutes les données d'un site non visité depuis "//un certain temps//", dont le ServiceWorker qui se voit supprimé. Voir [[https://webkit.org/blog/16535/meet-declarative-web-push/|Meet Declarative Web Push]] qui rappelle le fonctionnement de l'ITP (Intelligent Tracking Prevention) de Webkit. |
| | |
| |
| Voir chapitre "[[#tools]]" pour la mise en œuvre. | Voir chapitre "[[#tools]]" pour la mise en œuvre. |