How to block youtube JS fomr loading

Posted in: Newspaper
Post count: 65

Hi,

I have noticed that on the pages with embeded video, there is a heavy youtube JS loaded:

https://www.youtube.com/s/player/bce81a70/www-widgetapi.vflset/www-widgetapi.js

I am using lazy load for iframes and plugin that generates video thumbnail and shows just an image (only after clicking on image the video is loaded).

However still this JS is loaded. Please let me know whether it is hardcoded in any way via Newspaper functions? How could I block it by adding some snippet in functions.php? My other plugin will take care of connecting with youtube and getting any scripts required.

Thanks,
Michal

Post count: 65

Hi,

i got feedback from person in charge of lazy load plugin:

“So it looks like that script is getting loaded from this file:

wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js

It seems like that file is loading the YouTube iFrame API, which is then loading that widget script.

Is there any options that you have in your theme or that composer plugin to turn off the loading of the iFrame API/scripts?”

Please kindly confirm whether we have any configuration option for that and if not how I can block it in other way? I do not want to impact page speed with forced download of those YT scripts. Makes much more sense to have it on demand when a person actually presses the start button (and then the lazy load plugin will connect to YT).

Post count: 21065

Hello!

Unfortunately, we don’t have such an option for your issue.
Please note that customization is not covered by the support team: https://forum.tagdiv.com/newspaper-theme-support/
For customization and other services you can contact our custom work team here: https://tagdiv.com/premium-customization-services/

Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.