MENU

Embed YouTube video via a cookieless domain

  Previous article

Since the EU Cookie Law and the new General Data Protection Regulation law the use of (tracking) cookies is controversial. You need a cookie consent feature when embedding YouTube videos at your website to comply with these laws...

I was looking for a way to embed YouTube videos without asking for consent to set cookies. Thought of, and created, very complex cookieless (sub)domains, iframes in pop-ups, etc... But the solution is *very* simple.............. TOO [beeeep] SIMPLE!!!

  How to use

The solution is add "-nocookie" to the domain name!! youtube-nocookie.com is a domain that won't set cookies when you watch videos...

The usual method

<iframe src="//www.youtube.com/embed/8Q5BqakTy9U?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

Cookieless method

<iframe src="//www.youtube-nocookie.com/embed/8Q5BqakTy9U?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

Advertisement



Ads help me to help you! Thanks!

Ads help me to help you! Thanks!

  Working example



  Comment Form

Click here to open the form


  1 Comment

CMS Made Simple - Tutorials, tips and tricks - CMSMS

Embed YouTube video via a cookieless domain

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.8
  Last updated: 13-08-2018
  Comments: 1
  http://cms.ms/m0td

Advertisement



Ads help me to help you! Thanks!

Ads help me to help you! Thanks!

Ads help me to help you! Thanks!