2021 | 17% |
---|---|
2022 | 56% |
2023 | 54% |
100
75
50
25
0
In order to pass this test, you need to reduce the DOM size.
First, you need to identify the causes of an excessive number of DOM nodes. They can be: poorly coded plugins or themes, DOM nodes created dynamically via JavaScript, page builders that generate bloated HTML, copy-paste text into a WYSIWYG editor, hidden elements via CSS, etc.
Second, you need to remove the unnecessary tags and even refactor or rewrite some parts of the code/template. Another workarounds can be: code splitting (create more pages instead of one long page), consider to lazy load some parts of your website in order to speed up the initial rendering, implement infinite scroll, improve page rendering with content visibility (with the CSS content-visibility property, the browser will skip the styling, layout, and paint until the user scrolls down the page).