Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
StatisticElementValue
Total DOM Elements | 7,244 | |
Maximum DOM Depth | a#Afghanistan > span.visibility-hidden > svg.icon > path <path fill-rule="evenodd" clip-rule="evenodd" d="M11.35.643a.5.5 0 01.006.707l-6.77 6.886a.5.5 0 01-.719-.006L.638 4.845a.5…" fill="currentColor"> | 23 |
Maximum Child Elements | div.disclosure > div.disclosure__list-wrapper > div#HeaderCountryMobile-country-results > ul.list-unstyled <ul role="list" class="list-unstyled countries"> |
I assumed merely removing the shipping to that country would fix it, but it did not. I'm sure there is some edit in the theme code to fix this...
Solved! Go to the solution
This is an accepted solution.
Here is the thing about DOM size, there is no free lunch. The more content you have, the more dom elements you have
Content = DOM elements.
Of course things can be done a way to minimize DOM content, or not, but most developers don't give a **** about minimizing DOM content, usually because they are not instructed to, so there you have it. So yeah, depending on your theme, how many sections you have on any page, and the amount of apps you have injecting content, you can end up with alot of DOM elements.
Here is an experiment, copy your live theme, in the copy, go into the customizer and remove all the sections on the homepage, save. Take the preview URL, and run that in Page Speed Insights. If you have noticable reduction in DOM size, then you have too many homepage sections. If there is not a noticable change, then its either the header, or content being injected elsewhere, like popups, that are are heavy in DOM elements.
In summary: there is no easy fix, you have to decide whats really vital for your page and remove what isn't, if you are going to worry about that warning.
This is an accepted solution.
Here is the thing about DOM size, there is no free lunch. The more content you have, the more dom elements you have
Content = DOM elements.
Of course things can be done a way to minimize DOM content, or not, but most developers don't give a **** about minimizing DOM content, usually because they are not instructed to, so there you have it. So yeah, depending on your theme, how many sections you have on any page, and the amount of apps you have injecting content, you can end up with alot of DOM elements.
Here is an experiment, copy your live theme, in the copy, go into the customizer and remove all the sections on the homepage, save. Take the preview URL, and run that in Page Speed Insights. If you have noticable reduction in DOM size, then you have too many homepage sections. If there is not a noticable change, then its either the header, or content being injected elsewhere, like popups, that are are heavy in DOM elements.
In summary: there is no easy fix, you have to decide whats really vital for your page and remove what isn't, if you are going to worry about that warning.
I'll look into this. I ended up hiring someone on Fiverr to help get me approved on Google Merchant Center, which is the reason why I was trying to improve these pagespeed issues.
Hopefully it all works out, thanks!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024