Reduce HTML output to boost performance & SEO

Alpha1

Well-known member
XF2.3 has greatly boosted performance. I hope that further improvements can be made by optimizing the HTML output. A GTMetrix report for XF2.3 shows excessive DOM size with almost 3400 elements on a page and 103 child elements :

Screenshot_20240917_150902_Firefox.webp

Maybe waiting time for the page to load can also be reduced?

I hope that addon developers will posts their feedback on further boosting performance to this thread.
 
Last edited:
Upvote 7
dont test your homepage -- test a long thread with lots of content in it and see how you do.
99 on the homepage/forumhome is simple.
on threads, not happening.
Literally makes no difference unless it's a thread with a lot of images. And even then 97%.

Still, Xenforo does a good job by optimizing it in webp.
 
It makes a huge difference.

- Threads are what rank/serps, not the homepage.
-99% of content is on thread pages
-the sytax/layout is drastically different.
-it has little to do with images. Its about markup, nesting, depth of elements, and layout complexities that need to be rendered/painted
 
What score do you need ?
A result that makes Google and users loves our sites more than the competition. The score is already good and I'm certainly not complaining about it. But faster is always better because every second that your users need to wait for a page to load, you loose around 10% of users. And as the possibility exists and @Kier is currently writing a new style from the ground up, why not optimize that?

Another thing to consider is that XenForo currently hides your valuable content deep in the HTML code. i.e. there is a page element nested within a page element, within a page element, etc, etc, etc. In this random example it goes 103 layers deep. This is what is meant with excessive DOM size.
When a web page is loaded, the browser creates a Document Object Model (DOM) of the page. All the tags in the HTML document are called nodes and the sum of them is translated as the DOM size.

Its not that Google can't find your content, but Google sure is liking similar content on other platforms a whole lot better than in XenForo. DOM size is not the only reason for that, but its something that can be improved upon. And it would be nice to see that happening in a new style.
 
-99% of content is on thread pages
The score A, 99% comes from a thread, so it's not so bad.

1726595104515.webp

Its not that Google can't find your content, but Google sure is liking similar content on other platforms a whole lot better than in XenForo.
If on your forum you explain in a more professional, more documented way how to repair the AC-74439H thing you will have a good chance of being better placed than your competitor who explains it in a less satisfactory way, even if his page is loaded for 100ms faster...

The number of forums dating from the 1990s/2000s/2010s that appear first in the search results is considerable, because they provide the information you are looking for. Personally I think that looking for hundredths of a second in the technique is a sort of admission of weakness in relation to its content. Obviously as long as everything works as well as possible, that's the job of the XF team, and with 2.3 I think they've done something quite exceptional at that level.

That 3.0 can reduce the number of DOM elements, why not, but do not take this element as the reason why your competitor is better referenced. Google is not stupid, it wants the results it displays to be quick but above all it wants the Internet user to find the information they were looking for.

I'm speaking in a general way, I don't know your forum and I don't judge its content since I don't know it.
 
It seems that you have missed that the SEO part of this suggestion is not about speed. It's about HTML output that will rank better.

In regards to old forums ranking in Google. IIRC I got my first million of monthly users about 18 years ago. Nowadays it's much harder to attract high amounts of traffic on xenforo than when I use other software.
Deep nesting is something that can be improved upon IMHO. Not just for a small but welcome speed bump.
 
You are right, it is not a direct link with page loading speed. But regardless, whether it's related to speed or the number of DOM elements I'm not sure you'll have a better chance of getting organic traffic by having A and 100% rather than A and 99%.

And if it is more difficult to attract new members to the forums today, it is not necessarily for technical reasons but rather because the entire ecosystem has changed, and profoundly. But no one will complain, obviously, if XF becomes a little more efficient and effective in terms of SEO with each new release...
 
Back
Top Bottom