You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116933 Responsify 2.1.2 : Youtube and other content loaded on page load

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Wednesday, 06 November 2024 11:02 GMT

Nerayen

Hi,

Responsify 2.1.2
Joomla 4.4.9

Since I installed the latest version of Responsify, it seems content such as Youtube video is loaded on page load and not when clicked. I already had this problem (see my previous ticket), it was solved with Responsify 1.0.3, but it seems the problem came back.

Url example : https://www.aquitaineonline.com/destinations/france/geopolitique-de-la-citrouille-halloween-est-une-manne-a-44-8-millions-deuros-pour-cette-region-de-france-qui-tient-40-de-la-production-nationale.htmlPageSpeed audit : https://pagespeed.web.dev/analysis/https-www-aquitaineonline-com-destinations-france-geopolitique-de-la-citrouille-halloween-est-une-manne-a-44-8-millions-deuros-pour-cette-region-de-france-qui-tient-40-de-la-production-nationale-html/5dh5ha4o4t?form_factor=desktop

Let me know if you need more information,

Regards

Ryan

If you check the Network tab of the Browser Web Inspector (in Chrome View -> Developer -> Developer Tools), the files that Pagespeed refer to for Youtube are not being loaded, until the placeholder is clicked.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan

To prevent the iframe from loading anything, Responsify replace the iframe src attribute with a data-src attribute before Joomla renders the content. Without a src attribute, the iframe content won't load.

You can see this in the source code of the site:

<iframe referrerpolicy="strict-origin-when-cross-origin" title="Berry : production de citrouilles géantes !" width="710" height="400" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" frameborder="0" allowfullscreen="allowfullscreen" class="wf-responsive wf-responsive-full" data-src="https://www.youtube.com/embed/NBuujvMVdCI?feature=oembed&amp;controls=0&amp;rel=0&amp;modestbranding=1&amp;privacy=1" loading="lazy" ></iframe>

When the placeholder is clicked, the src attribute is added back with the value from the data-src attribute, and the iframe loads.

It appears there is some other script - not Responsify - is adding the src attribute back when the page loads. Do you have some kind of "lazy load" script or process active on the site?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Nerayen

Hi Ryan,

thank you for your explanations. JCH Optimize is installed on the website. Lazy Loading is active, but not for iframes, but still, my guess is my problems come from JCH. As two other persons modified the settings of JCH on the past few months without telling me, I first tried to find what was modified and what was the functionnality creating the problem. After hours of unsuccesful tests, I decided to start from scratch with this extension. I may have managed to find the rights settings, with a balance of loading performances enhancement and Responsify correctly working. Unfortunately, I didn't manage to understand what was the cause of the initial malfunction, so I don't have an interesting feedback to give here.

Thank you again for your help

Ryan

I may have managed to find the rights settings, with a balance of loading performances enhancement and Responsify correctly working. Unfortunately, I didn't manage to understand what was the cause of the initial malfunction, so I don't have an interesting feedback to give here.

Great, as long as it is working! 😀

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.