[Resolved] Excessive DOM size 4293 elements

Home Forums Support [Resolved] Excessive DOM size 4293 elements

Home Forums Support Excessive DOM size 4293 elements

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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?
    Thanks

    #2264272
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?

    Let me know 🙂

    #2264303
    Mathieu

    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/FE1tW9pWgB7D

    #2264377
    Mathieu

    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?

    #2264457
    Leo
    Staff
    Customer Support

    How many elements have you created under Appearance > Elements?

    #2264545
    Mathieu

    There is 9 éléments.

    #2264728
    David
    Staff
    Customer Support

    Hi 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.

    #2264757
    Mathieu

    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 !

    #2264985
    David
    Staff
    Customer Support

    Well 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.

    #2265468
    Mathieu

    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 !

    #2265497
    David
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.