I am trying to optimize the speed of the site. Currently the major concern is the JavaScript from the Facebook and YouTube plugin, both of them seems cannot be optimized (defer/async) by the Autopmize JavaScript plugin, do you have idea how to defer/async the JS induced by Penci Facebook and Youtube?
The youtube is called by the Penci Video Playlist element where a youtube link is put in. Can I defer the JS of Penci Video Playlist? Seems that the js for Penci FB is penci-facebook-js, do you think it's good to try penci video? If so what is its JS's name please? thank you!
With Penci Video Playlist - we don't enqueue any javascript. We're using youtube API to get video data and use iframe That's why no any javascript enqueue here.
Hi sir,
I am trying to optimize the speed of the site. Currently the major concern is the JavaScript from the Facebook and YouTube plugin, both of them seems cannot be optimized (defer/async) by the Autopmize JavaScript plugin, do you have idea how to defer/async the JS induced by Penci Facebook and Youtube?
Thank you very much for your kind help!
Hi,
You can try with add more this code at the end of functions.php file to defer JS from Penci Facebook Widget:
For youtube - the script come from youtube embed code itself, so you can't do that..
Best Regards,
PenciDesign
Thank you the defer js for penci facebook works.
The youtube is called by the Penci Video Playlist element where a youtube link is put in. Can I defer the JS of Penci Video Playlist? Seems that the js for Penci FB is penci-facebook-js, do you think it's good to try penci video? If so what is its JS's name please? thank you!
Hi,
With Penci Video Playlist - we don't enqueue any javascript. We're using youtube API to get video data and use iframe That's why no any javascript enqueue here.
Best Regards,
PenciDesign