Community, Discussions & Guides › Forums › Web Technology › Make your Page with YouTube embedded video load faster

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #361
    ludykraks
    Keymaster

    Yes, we all know how much weight those YouTube embeds can add to your webpage, making your site’s user experience awful.

    What if there is a fix?

    Yes, there is.

    You can now use the native loading-lazy for <iframe>.

    You can use lazy-loading to defer loading offscreen iframes until users scroll near them.

    The loading attribute for <iframe> is available in all lastest Chromium browsers.

    Example:

    <iframe src="https://youtube.com"
           loading="lazy"
           width="800"
           height="500"
    </iframe>

    To learn more about making your embeds efficient on your website, visit this Google best practices page.

    #1408
    Mr Jhon
    Participant

    To make a page with an embedded YouTube video load faster, try using a lazy load technique or replacing the embed with a clickable thumbnail that loads the video only when clicked. This reduces the initial load time and improves user experience. You can also defer JavaScript and minimize unnecessary third-party scripts. Performance optimization like this is essential for any site.

    • This reply was modified 1 year ago by Admin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Recent Posts