Category: debounce

Quick Tip: How to Throttle Scroll Events

One of the perils of listening to scroll events is performance degradation. The browser will execute the callback every single time the user scrolls, which can be many events per second. If the callback performs a bunch of repaints, this means bad news for the end user. Repaints are expensive, especially when you are r...

Debouncing and Throttling Explained Through Examples

The following is a guest post by David Corbacho, a front end engineer in London. We’ve broached this topic before, but this time, David is going to drive the concepts home through interactive demos that make things very clear.Debounce and throttle are two similar (but different!) techniques to control how many ...