Site logo

Archived topic

Excessive DOM Size

5 replies · Started by Nicole on November 24, 2022

Viewing posts 1–6 of 6

Hi,

The page linked below has 2,557 elements (an excessive DOM size).

I can't find out what 2,557 is made of so I don't really know what the cause it.

Could the navigation be causing it?

Hi Nicole,

What happens if you disable all plugins non-GP plugins?

Let me know :)

Is there any other way to check? If I do that then the site won't be functional for a while and I don't know how to set up a staging site.

Hi Nicole,

To begin with, everything in an HTML document is a node, and once your node count in your HTML exceeds 800, a warning will be raised.

To put that into perspective – generatepress.com has less than 20 nodes.

Here are some recommendations to resolve this: https://www.corewebvitals.io/pagespeed/fix-avoid-excessive-dom-size-lighthouse

Leo's suggestion to disable plugins is meant to check if other plugins are adding high amounts of nodes to your HTML. Another way to check this is by using a Staging site so you can disable plugins safely.

An alternative would be to move other stuff on this page to another page. Adding a WordPress Page Break block should allow you to do this. Reference: https://wordpress.com/support/wordpress-editor/blocks/page-break-block/

Hope this clarifies!

Thanks very much for the explanation. I will check it out.

You're welcome Nicole!

This archived topic is closed to new replies.