Intermittently Broken Images — objectURL Race, WebP Fallback, Service Worker Shell
Three things I learned chasing an image bug that flickered in and out on every refresh — the objectURL lifetime race, preventing test hangs from browser-only libs, and scoping the service worker shell fallback to navigation requests
- Render images the server provides by URL directly, do not wrap them in an objectURL blob — this eliminates the createObjectURL lifetime race at its source
- When putting a browser-only (canvas) lib on a test path, block jsdom hangs with a synchronous capability gate before execution