Idle callbacks
Runs low priority work when the browser is idle; no prompt.
In one line
Can wait until the browser is idle to run low priority jobs
Runs low priority work when the browser is idle; no prompt.
A site can wait until the page is quiet before running analytics or prefetching. It also reveals roughly how busy your device is, since idle windows are shorter on slow devices or busy tabs.
What it can and can't do
What the user does: Nothing. It happens when the page loads and the browser is quiet
It can
- Run analytics or preload files when things are calm
- Learn roughly how busy your device is, since gaps are shorter on slow ones
It cannot
- Work in Safari, which does not support it
- Run when the browser is busy
- Ask permission first
- See your files
How it differs between platforms: Chrome, Edge and Firefox support it. Safari does not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 47 | 2015-12-01 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 55 | 2017-08-08 | None |
| Safari | Behind a flag | preview | Not listed | Behind a flag or setting |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 47 | 2015-12-02 | None |
| Samsung Internet | Supported | 5.0 | 2016-12-15 | None |
How a site asks for it
| API | requestIdleCallback(cb, {timeout}); IdleDeadline.timeRemaining() |
| Browser compat keys | api.Window.requestIdleCallbackapi.IdleDeadline |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Per page; callbacks do not run when the tab is in the background in most engines |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Per frame; iframes get their own deadline |
Typical flow
- Page calls requestIdleCallback
- Browser runs the callback when the main thread is idle
- Callback reads timeRemaining() and does bounded work
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- timeRemaining() is capped at 50 ms per idle period (spec) so the page stays responsive
- Firefox and Chrome support it; Safari ships it only as a preview or flag (not in release Safari), none in iOS Safari
- In the background, callbacks may be delayed by long periods or run only once a minute
- A timeout option forces the callback even if the browser stays busy
- Chrome Android and Samsung Internet support it; desktop Safari has it behind a flag or preview only
The story
What it is
A page schedules low priority work for moments when the browser has nothing urgent to do.
For you
You never see it. It helps pages stay smooth by doing small chores, like sending reports or preloading, only when nothing else needs the browser.
For makers
Teams use it to push analytics, prefetching and cleanup out of the way of clicks and typing. It improves speed scores. It can also tell a script how busy the page is.
Where you see it
| Type | Example | Apps |
|---|---|---|
| shopping | A shop preloads the next product image only when idle, so taps stay fast. | None named |
| analytics | An analytics tag sends data in idle time so it does not slow the page. | Google Tag Manager |
| productivity | A web editor runs spell check and autosave in idle moments, so typing stays smooth. | Google Docs |
| games | A browser game loads the next level in idle time between actions. | None named |
| ads | An ad script loads its heavy parts in idle time after the page is ready. | None named |
| developer | A framework like React splits long work into small tasks in idle slices. | React |
| news | A news site loads comments and related stories only when idle. | None named |
Risks
- Not available everywhere
- Idle gaps hint at activity
What the platform says
- MDN: requestIdleCallback. Lets pages run background work when the browser is idle, so important work is not slowed down.
Good uses and abuse
Legitimate uses
- Analytics batching
- Cache warming and prefetch
- Non-critical rendering
Known abuse
- Hidden fingerprinting during idle time
- Mining that avoids detection by running only when idle
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 1 | Rough identifying entropy, when known |
History
- 2015-12, Chrome 47: requestIdleCallback ships
- 2017-08, Firefox 55: requestIdleCallback ships
Related capabilities
Related
- Task scheduling (postTask, yield). Can sort its own tasks so the page stays quick when you tap
- User activation and idle inference. Can see if you recently clicked or typed, and in Chromium if you are idle
Sources
How well checked: Based on official documentation.