[wp-trac] [WordPress Trac] #44610: Allow Youtube-Player to use youtube-nocookie.com URLS to avoid setting cookies.

WordPress Trac noreply at wordpress.org
Tue Sep 6 17:26:18 UTC 2022


#44610: Allow Youtube-Player to use youtube-nocookie.com URLS to avoid setting
cookies.
-------------------------------------------------+-------------------------
 Reporter:  jepperask                            |       Owner:
                                                 |  williampatton
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Embeds                               |     Version:  4.9.7
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch needs-dev-   |     Focuses:  privacy
  note close                                     |
-------------------------------------------------+-------------------------

Comment (by adakaleh):

 Okay, let's see if we can finalize this. Switching to yt-nocookie
 everywhere would have been an easy win for privacy, but WordPress devs
 don't agree with the change. In any case, note that yt-nocookie alone is
 probably not sufficient for GDPR compliance, as the embed still sets some
 IDs in local storage that (I suppose) require the visitor's "consent".

 A proper solution for third-party video embeds is to use an image
 placeholder that becomes an iframe when clicked. This method not only
 improves privacy, but also lifts the iframe's performance burden from the
 initial page load. There are plugins for this, but WordPress really should
 support it natively. The savings in terms of page load time and energy
 consumption would be massive, given the scale at which WordPress is used.

 But until we get there, here are a few patches for converting youtube-
 nocookie links to youtube-nocookie embeds (see above):

 - The first patch allows nocookie embeds within posts.
 - The second does the same for video headers.
 - The third adds nocookie support to other youtube regular expressions. I
 don't know how they are used, but I figured they should match.
 - The fourth patch adjusts a youtube regex within a test.

 There are also a few YT regular expressions within the TinyMCE code, but
 they probably should be dealt with upstream. Then again, the patches above
 seem to be sufficient for our purposes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44610#comment:59>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list