Skip to main content

Posts

Showing posts with the label efficient

A More Efficient Method for Embedding YouTube Videos

When you embed any YouTube video on your website using standard IFRAME tags , you’ll be surprised to know how much extra weight that YouTube video will add to your page. The web page has to download ~0.5 MB of extra resources (CSS, JavaScript and images) for rendering the YouTube video player and the files will download even if the visitor on your website has chosen not to watch the embedded YouTube video. The embedded video is making your page heavy and the visitor’s browser will also need to make multiple HTTP requests to render the video player. This increases the overall loading time of your page and thus affects the page speed score. The other drawback with the default YouTube embed code is that it isn’tresponsive. If people view your website on a mobile phone, the video player would not resize itself accordingly. Load YouTube Video Player On-Demand Google Plus uses a clever workaround to reduce the time it takes to initially load the YouTube video player and we can incorporate a ...