intersectionObserver to detect elements in the viewport and lazy load them.
- Supported by all major browsers
- Lower performance compared to native
Browser Native lazy loading
The threshold of lazy loading is determined by the browser based on several factors like connection speed, data saver mode, etc.
- Fast, performant
- Less chance of conflicts
- Higher thresholds
- Not supported in Safari and Opera
You can read more about native lazy loading here: https://web.dev/native-lazy-loading/