XF 1.5 Page speed when thread has multiple Youtube embeds

Mr Lucky

Well-known member
Does anyone know a way to speed up page loads in xenforo when a thread has multiple Youtube embeds?

Thanks
 
I can't remember what it is called, but I believe there is an add-on in the Resource Manager that defers the loading of YouTube embeds until they are clicked. That is one solution.

It's worth checking what your embed code is for YouTube. If you're using the old style <object> embed code rather than the new style <iframe> embed code, then I recall this may have performance issues.

It may also be dependent on whether you are being served the flash player or their newer HTML5 player. The latter will have better performance in newer browsers.
 
It's worth checking what your embed code is for YouTube. If you're using the old style <object> embed code rather than the new style <iframe> embed code, then I recall this may have performance issues.

It may also be dependent on whether you are being served the flash player or their newer HTML5 player. The latter will have better performance in newer browsers.

AFAIK it is just the default xenforo settings.
 
Hi Chris

This is what I have for Youtube embeds, I presume that is the new style you mention

Code:
<iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>

It may also be dependent on whether you are being served the flash player or their newer HTML5 player. The latter will have better performance in newer browsers.

Is there a way to find out?
 
This is what I have. I have whole threads stuffed with YouTube embeds and the pages are fine. I also add a <p> tag to force them onto new lines, keeps it tidier.

Code:
<p><iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque&controls=2" frameborder="0" allowfullscreen></iframe></p>

This worked like a charm for me, page and videos load instantly. Thanks!
 
Setting up a new forum again, been awhile but without using the addon is it still okay to use this or has anything changed since?

Code:
<p><iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque&controls=2" frameborder="0" allowfullscreen></iframe></p>

Cheers
 
try to add controls=2 to the youtube link in the embed code
We did that several months ago, and it made the forum much faster. Especially for visitors on ancient computers and operating systems. The idea is that adding "&controls=2" keeps the embedded YouTube from preloading content. I would not even bother with an add-on: just edit what's there. I have @Jeremy to thank for this tip. ;)
 
This is what I have. I have whole threads stuffed with YouTube embeds and the pages are fine. I also add a <p> tag to force them onto new lines, keeps it tidier.

Code:
<p><iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque&controls=2" frameborder="0" allowfullscreen></iframe></p>
Will test and hope still work for xf 2 :)
 
Prefer to avoid the use of plugins if possible :)

It may be worth noting my original question here was in regard to a YouTube embed via custom media bbcode. that is no longer necessary since auto embed of Youtube. So the solution of adding controls=2 is not really relevant anymore. So perhaps the addon is now the only way to go if using the xenforo default embedding.
 
Back
Top Bottom