App Development•5 min read

Embedding YouTube and Mixcloud on your website without slowing it down

To embed a YouTube video or a Mixcloud show without slowing your website down, show a small preview image first and load the real player only when a visitor presses play. When we measured it, a standard YouTube embed downloaded about 1.2 MB before anyone pressed play and a Mixcloud widget about 3.1 MB, while a click-to-load preview came to 24 KB.

An embed is the snippet YouTube or Mixcloud gives you to put their player on your own page. It is the quickest way to add video or audio, and for a page with a single clip it is usually fine. The trouble starts when a page carries several players, when most visitors never press play, or when you publish every week and someone has to copy each new link onto the website by hand.

The short version

  • A player you paste in starts downloading the moment the page opens, whether or not anyone watches.
  • A click-to-load preview, which Google calls a facade, keeps that cost off the page until a visitor asks for it.
  • YouTube’s privacy-enhanced mode changes what YouTube does with the view; it does not make the player any lighter.
  • YouTube and Mixcloud both let a website read new uploads automatically, so shows can fill themselves.

How much does a YouTube embed slow a page down?

We put a single player on an otherwise empty page, opened it with an empty browser cache, and counted everything it downloaded before anyone pressed play.

On the pageDownloaded before playRequestsSeparate servers
Standard YouTube embedabout 1,170 KB199
YouTube privacy-enhanced embedabout 1,150 KB157
Mixcloud widgetabout 3,180 KB928
Click-to-load preview image24 KB11

That is per player. A page with three videos asks the visitor’s phone to fetch three players before your own content has finished arriving, and every one of those requests competes with your page for the same connection.

What one player downloads before anyone presses play. Measured 5 October 2026: one player on an empty page, empty browser cache.

Google’s own page-speed guidance has a name for the fix. A facade is “a static element that looks similar to the embedded third-party, but is not functional”: in practice, the video’s thumbnail with a play button on it. Google’s example facade weighs 3 KB, with a 540 KB player loaded only when someone interacts. The player we measured was more than twice that size, which makes the case stronger, not weaker.

Visitors notice nothing, except that the page appears sooner. Press play and the real player loads and starts; most people cannot tell a facade from the player it stands in for.

Is YouTube’s privacy-enhanced mode enough?

YouTube’s privacy-enhanced mode, which serves the player from youtube-nocookie.com, stops a view of your embedded video from personalising that person’s YouTube experience or the ads they see elsewhere. That is worth having. It is not the same as loading nothing: in our test the privacy-enhanced player still downloaded about 1,150 KB from seven servers before anyone pressed play.

In the UK, the ICO’s guidance on cookies is that anything stored on a visitor’s device that is “helpful or convenient but not essential” needs their consent. The simplest way to stay on the right side of that is to let the visitor decide: load the player when they press play, or once they have agreed to it in your cookie banner, and say so in plain words next to the preview.

Can your website update itself when you upload to YouTube or Mixcloud?

Yes, and for anyone who publishes every week this is where the real time goes. Both platforms let other software read what you have published. Mixcloud’s public API needs no login to read a profile’s shows. YouTube’s Data API gives each project a free allowance of 10,000 units a day, and reading a list of videos or playlists usually costs one unit.

In a recent build for a student radio and television station, the website checks the station’s YouTube channel and Mixcloud account three times a day. Each check uses about 80 units, under 1% of the day’s allowance. New recordings and videos are filed under the right show by simple rules the station sets, such as “the title contains the show’s name”, and a brand-new YouTube playlist arrives as a draft show for an editor to approve rather than appearing on the site unchecked.

A website that checks YouTube and Mixcloud three times a day, so nobody copies links by hand.

One practical catch: YouTube lets you lock a key to your website’s address, which suits code running in a visitor’s browser. A check that runs on your server does not come from a browser, so a key locked that way is refused; restrict it to the YouTube Data API instead.

When is a plain embed good enough?

Not every page needs any of this. At a glance:

  • One clip that most visitors watch: a standard embed is fine.
  • Several clips, or most visitors scroll past: use click-to-load previews.
  • Audio across the whole site, such as a radio station: one player that stays put as visitors move between pages, rather than a widget on every page.
  • New uploads every week: read them from the platform automatically instead of copying links.

If you are weighing a bigger change than a few embeds, our notes on custom software development and the integrations we already build show the kind of work involved.

Make the player wait for the visitor

The fastest player is the one that has not loaded yet. Show a preview, load the real thing when someone asks for it, and let your website collect new episodes on its own so nobody spends Monday morning pasting links. If your video or audio pages feel slow, or keeping them up to date takes too long, talk to us about it.

Sources

  1. Chrome for Developers: Lazy load third-party resources with facades
  2. YouTube Help: Embed videos and playlists (privacy-enhanced mode)
  3. ICO: Cookies and similar technologies
  4. Google for Developers: YouTube Data API overview and quota
  5. Mixcloud: API documentation
  6. Swarm Labs measurements, 5 October 2026: one player on an empty page, Chromium, empty cache, three runs each.

Want this wired up
for you?