IntersectionObserver is a W3C JavaScript API for tracking element visibility. Learn which browsers support it, how to use it, and the known issues to plan for.

Prince Dewani
May 1, 2026
IntersectionObserver is a W3C JavaScript API that asynchronously reports when an element enters or leaves the viewport or a chosen ancestor. It works in Chrome 58+, Edge 16+, Firefox 55+, Safari 12.1 on macOS, Safari 12.2 on iOS, Opera 45+, and Samsung Internet 7.2+, while Internet Explorer never added support.
This guide covers what IntersectionObserver is, its browser support, key features, use cases, how to use it in JavaScript, the differences from MutationObserver, and known issues.
IntersectionObserver is a JavaScript API standardized by the W3C that watches when a target element crosses into or out of a chosen viewport or ancestor element. The constructor takes a callback and an options object, and the browser fires the callback whenever the target's visibility crosses one of the configured thresholds.
IntersectionObserver works in every modern browser, including Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet. Internet Explorer is the only major browser that never added support.
Chrome supports IntersectionObserver from Chrome 58 on desktop and Android. Chrome 51 to 57 had partial support, and Chrome 50 and earlier did not include the API.
Edge supports IntersectionObserver from Edge 16 on desktop, and the Chromium-based Edge releases that followed inherit the same support. Edge 15 had partial support, and Edge 12 to 14 did not support it.
Firefox supports IntersectionObserver from Firefox 55 on desktop and Android. Firefox 52 to 54 included the implementation but kept it disabled by default behind the dom.intersection-observer.enabled flag, and Firefox 51 and earlier did not support it.
Safari supports IntersectionObserver from Safari 12.1 on macOS and from Safari 12.2 on iOS and iPadOS. Earlier Safari versions on either platform did not support the API, so iOS 12.1 and below need the WICG polyfill.
Opera supports IntersectionObserver from Opera 45 on desktop and from Opera Mobile 80 on Android. Opera 38 to 44 had partial support, and Opera Mini does not support IntersectionObserver in any version.
Samsung Internet supports IntersectionObserver from Samsung Internet 7.2 on. Versions 5 to 6.4 had partial support, and Samsung Internet 4 and earlier did not support it.
The WebView-based Android Browser supports IntersectionObserver from version 147 on. Older Android Browser versions did not include the API.
Internet Explorer does not support IntersectionObserver in any version, including Internet Explorer 11. Microsoft has retired Internet Explorer, so apps that still rely on IE must ship the WICG polyfill or migrate users to Edge.
Note: IntersectionObserver behavior shifts across browsers, OS, and viewport sizes. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
IntersectionObserver gives you asynchronous, batched callbacks tied to the browser's render pipeline, plus configurable visibility thresholds that fire only when the target crosses them.
IntersectionObserver replaced expensive scroll-based visibility checks across the modern web stack and now powers a handful of patterns every team ships.
Create an observer with a callback and an options object, then call observe on each target element. The browser invokes the callback every time a target crosses one of your thresholds.
// Lazy-load images as they approach the viewport
const target = document.querySelector(".lazy-image");
const options = {
root: null, // null means the browser viewport
rootMargin: "0px 0px 200px 0px", // pre-load 200px before the bottom edge
threshold: 0.1, // fire when at least 10% is visible
};
const observer = new IntersectionObserver((entries, self) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const img = entry.target;
img.src = img.dataset.src;
self.unobserve(img); // stop watching after the swap
}
});
}, options);
observer.observe(target);If the callback never fires, log entries inside it first; the observer is silent until at least one threshold is crossed, including the implicit 0 threshold on the very first paint.
IntersectionObserver tracks when an element becomes visible inside a viewport or ancestor; MutationObserver tracks when the DOM tree changes. They solve different problems and often run side by side in the same app.
| Dimension | IntersectionObserver | MutationObserver |
|---|---|---|
| Watches | Element visibility against a root | DOM tree changes (childList, attributes, characterData) |
| Common use cases | Lazy loading, infinite scroll, ad tracking | Detecting injected DOM, attribute changes, third-party widgets |
| Constructor options | root, rootMargin, threshold, plus delay and trackVisibility for V2 | Passed to observe(): childList, attributes, subtree, characterData, attributeOldValue |
| Callback payload | IntersectionObserverEntry array (isIntersecting, intersectionRatio, rootBounds) | MutationRecord array (type, addedNodes, removedNodes, attributeName) |
| Scope control | observe(target), unobserve(target), disconnect() | observe(target, options), disconnect(), takeRecords() |
| Browser support floor | Chrome 58, Firefox 55, Safari 12.1, Edge 16 | Chrome 26, Firefox 14, Safari 7, Edge 12 |
IntersectionObserver covers most visibility tracking, but a few edge cases trip up even experienced teams.
All IntersectionObserver version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance