Rasmus​.krats​.se

This page in English

Inlägg taggade ”gdpr”

Skriverier då och då, på webben sedan 1994.

Tracker-free youtube embedding

Posted 2022-04-03 18:04. Tagged , , , , , .

Sometimes I want to embed a video on my site. Most of the videos I want to embed are on youtube. Klicking share on a video and choosing embed, I get a bunch of html code I can copy into a post. Something like this, for example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/3St1CoH1rKU"
  title="YouTube video player" frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen>
</iframe>

That’s very easy. The downside is that youtube gets a request for the iframe (and a bunch of stuff it loads from there) every time someone looks at my page, which makes it possible for them to track you, my reader, across my site and other sites that includes videos.

Read whole Tracker-free youtube embedding.