Member-only story

Better Explaining The Reason For Video Facades

Jason Knight
CodeX
Published in
4 min readApr 22, 2023
Photo by Christian Wiediger on Unsplash

In my last article I showed a semi-simple way of creating “video facades”, a way to better “embed” third party videos — in this case those from YouTube — in a page.

Almost moments after posting it I got a few “friends in the biz” private messaging me asking why adding code like this is advantageous. I looked back and it’s like “Wow, I explained the how, but kind of skipped the why!”

So I figured I better do a follow up better explaining “why” and backing it up with some real-world numbers.

It’s All About Load Times And Lighthouse Scores

As I said in the previous article, a lot of third party assets just plain suck greatly penalizing your load times and lighthouse score. To illustrate this let’s take my pen and turn it into two static pages. One loading the iframe embeds exactly as YouTube provides them, the other using my facade script.

You can find both demo pages here:
https://cutcodedown.com/for_others/medium_articles/videoFacades/

If we look at the “nofacades.html” in the normal network waterfall.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

Responses (1)

What are your thoughts?