YouTube Facade is the name of this plugin I’m sharing with you, but it started – like most things I make – as something entirely for my own use, on Home for Fiction. A facade is an interface that “masks” another kind of content — in this case, an embedded YouTube video.
Why, you might ask.
Facades serve a dual role:
- They help with privacy requirements. Because the third party (in our case, YouTube) doesn’t load automatically on page load, Google/YouTube can’t place cookies unless the user explicitly allows it.
- They help with site speed, as the page only needs to load a small image, rather than an embedded video.
If you’d like to see how it works, check it out e.g. on this page. Everywhere on the blog (and the main Home for Fiction site) there’s a YouTube video, facades are displayed.
(more…)