XF 2.2 Xenforo and "Cumulative Layout Shift" Problem

qwer81

Member
Hi guys, Pagespeed reports this "Cumulative Layout Shift" problem, probably caused by banner ads (but I'm not sure). Is it possible, through Xenforo, to block the page so that there are no unexpected movements of the web page? Thank you
 
XenForo isn't going to be able to stop CLS caused by things you add on your own (like banner ads).
That's right. By default all images will be have CSS max-width:100% and height:auto. That is what makes them responsive. But to stop CLS the image itself should have an explicit with and height written in the page code of each image irrespective of the "blanket img CSS. , e.g. width=600 height=200

As an example my banner ads <img class="equi" width="110" height="110" src="https://cafesaxophone.com/x-pic/equi2-books.webp" alt="Tutorials" /></a>

So the CSS is applied by xF to img, and my own CSS to equi. But still each image has its own explicit height and width.
 
XenForo has no CLS by default
Wrong :)

XenForo < 2.3 does cause CLS in various places like embedded images or emojis.
 
Wrong :)

XenForo < 2.3 does cause CLS in various places like embedded images or emojis.
I didn’t check exhaustively, just the main page. 🤷🏻‍♂️
 
Back
Top Bottom