Browser & Web Performance · Middle · Question 18 of 75
What does requestIdleCallback do?
- 1Waits for the network to become idle
- ✓Correct answer: Runs a callback when the browser is idle, for low-priority background work
- 3Pauses all JavaScript until the user is idle
Explanation
It's good for things like sending analytics or prefetching. Don't use it for work the user is waiting to see.