- This topic has 10 replies, 3 voices, and was last updated 1 year, 3 months ago by
David.
-
AuthorPosts
-
June 25, 2022 at 10:08 am #2264252
Mathieu
Hello team,
I just migrated my site using generatepress https://www.justificatif-de-domicile.fr/, because I was previously using a wordpress builder that I wanted to eliminate, for performance issues.
Unfortunately, after going online and using the pagespeed, I see the error: Have excessive Dom size – 4293 elements.
As I know that generatepress is pretty well optimized, I must have made a mistake… but I can’t figure out which one!
Would you have an idea?
ThanksJune 25, 2022 at 10:33 am #2264272Leo
StaffCustomer SupportHi there,
Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?
Let me know 🙂
June 25, 2022 at 11:36 am #2264303Mathieu
Hi Leo,
Thanks for your fast answer 🙂
I just did it, keeping GP Premium + generateblocks, but unfortunately this is still the same : https://prnt.sc/FE1tW9pWgB7DJune 25, 2022 at 1:56 pm #2264377Mathieu
I’ve been reading others posts on this forum talking about same problem, like on https://generatepress.com/forums/topic/avoid-an-excessive-dom-size-1449-elements/ where David recommends to reduce the number of elements on a page.
But my homepage is relatively clean and short, I don’t see how to reduce it.
Is this DOM linked to the elements of the whole site?June 25, 2022 at 6:30 pm #2264457Leo
StaffCustomer SupportHow many elements have you created under Appearance > Elements?
June 25, 2022 at 10:58 pm #2264545Mathieu
There is 9 éléments.
June 26, 2022 at 5:03 am #2264728David
StaffCustomer SupportHi there,
on your PSI Report under: Avoid an excessive DOM size 4,263 elements if you expand that diagnostic you see:
Maximum Child Elements:
<div class="fc-preferences-container">
Which i tracked down to being part of your Cookie Consent form container. So Google is seeing that on its tests, as its not going to consent to your cookies or cache the load.
And now see here – look how many nodes that cookie consent is creating:
Have a chat with the cookie consent author about this.
June 26, 2022 at 6:05 am #2264757Mathieu
Hi David,
Thanks for the premium response!
Indeed, I just deactivated the consent author cookie and I don’t get this error message anymore on pagespeed.I’m really surprised because the consent author cookie is no other than …. the one from Google Adsense itself !
For all those who would have the same problem as me, it is probably enough to use a third party solution
Thanks for the efficiency and the availability of the Generatepress team !
June 26, 2022 at 8:22 am #2264985David
StaffCustomer SupportWell at least Google are consistent, thats another one of their ‘products’ that fails their own web dev metrics lol
I see a lot of users in this forum use the Complianz plugin for GDPR / Cookie consent.
Glad to be of help.
June 27, 2022 at 1:09 am #2265468Mathieu
You are 100% right David 🙂
By removing the tag provided by adsense for the RGPD consent, the page speed of my page went from 55 to … 99.Good to know for all users !
June 27, 2022 at 1:41 am #2265497David
StaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.