- SW script size: The generated SW is ~8–15 KB before gzip. Keep custom routes minimal.
- Precache list: Large precache lists slow the SW install. Limit to 20–30 critical URLs.
- Push payload size: Web Push limits the payload to 4 KB (including the encryption overhead). Keep notification bodies under 1 KB.
- Analytics beacon: Uses
navigator.sendBeaconwhich is non-blocking. No impact on page performance. - Navigation Preload: Enable
navigation_preloadto avoid SW startup latency on navigation requests. This lets the network request start before the SW is fully ready. - Icon generation: GD-based icon generation is a one-time operation. The generated PNGs are cached in
uploads/opwa-icons/and not regenerated unless you trigger it manually.
Reference
