iframe
An HTML element that shows another web page inside a box on the current page, such as a video or map.
In more detail
Each iframe loads a full page with its own scripts, which is heavy. Lazy-load iframes that are not visible immediately, and restrict what embedded pages may do with the sandbox attribute.
Related terms
- YouTubeEmbed — An @next/third-parties component that shows a light placeholder and loads the full YouTube player only when needed.
- GoogleMapsEmbed — An @next/third-parties component that embeds a Google Map and lazy-loads its iframe by default.
Taught in
- Script Optimization: next/script & Lazy Third Parties — Next.js 15 & Modern App Router Architecture