External script from youtube.com loaded on all pages, also without video embeds
-
During the process of preparing client sites for #gdpr-compliance, we found that current plugin version 11.8.6.1 with WordPress 4.9.5 loads an external script from youtube.com on each and every page of the website, also if no youtube embed is found on the page.
We tracked it down to the file
youtube-embed-plus/scripts/ytprefs.min.js
which contains this code (quote from non-minified version) and is included on all pages.(function (window, $) { [...] if (typeof window.YT === 'undefined') { var iapi = document.createElement('script'); iapi.src = "//www.youtube.com/iframe_api"; iapi.type = "text/javascript"; document.getElementsByTagName('head')[0].appendChild(iapi); } else if [...]
Suggested solution and expected behaviour: Load external scripts only on pages which also have youtube embeds.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘External script from youtube.com loaded on all pages, also without video embeds’ is closed to new replies.