The Background Fetch API lets you download large files even if the user
navigates away or closes the tab. Unlike fetch(), it continues in the background.
Use cases: Downloading movies, podcasts, large datasets, game assets, etc.
Fetches local files (including a 5 MB dummy file) to simulate a larger download.
The DevTools Network → Offline checkbox only emulates offline for the page's own requests
(fetch(), XMLHttpRequest, etc.). Background Fetch is handled by the browser process itself,
so it bypasses DevTools network emulation entirely.
To test a failed background fetch, disconnect your actual network (disable Wi-Fi / unplug Ethernet). This is by design — it's what makes Background Fetch resilient!
⚠️ Important: Abort and navigate-away are separate experiments. If you abort, the fetch is permanently cancelled — it will NOT continue.