[Resolved] How to reduce excessive DOM size?

Home Forums Support [Resolved] How to reduce excessive DOM size?

Home Forums Support How to reduce excessive DOM size?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1013228
    Pankaj

    Hello , google page speed tool test recommends me to reduce excessive DOM size , it shows 1750 elements in my DOM and the recomended is upto 1500 Elements. Please help me in reducing the DOM size?

    #1013829
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This means some elements on your pages are using a lot of characters/code.

    At first glance, it might be all of the social icons using SVG elements. I would disable that plugin and run the test again just to see.

    If that doesn’t fix it, I would go through your plugins one by one and deactivate them to see which one is causing the excessive code on the page.

    #1014344
    Pankaj

    After deactivate addtoany social plugin the DOM size fixed. Thankyou for your help.
    But now plz suggest me any social share&follow plugin compatible to this theme which isn’t increase the size of DOM.
    Now 3 problems are remaining in my speed score :
    1. Ensure text remains visible during webfront load.
    2. Reduce JavaScript execution time
    3. Minimize main thread work
    4. Remove unused CSS.

    Please help me regarding this.

    #1014680
    David
    Staff
    Customer Support

    Hi there,

    1. You can remove the generatepress font by selecting SVG icons in the Customizer > General.
    Then this filter Tom provides to change the font-display property to swap:

    https://generatepress.com/forums/topic/add-font-display-swap/#post-993058

    2. You have a large amount of JS files being loaded for your adverts, the only fix to this is to reduce the number of ads.

    3. Minimize main thread work will mean reducing the amount of content you add to the page.

    4. This is not something that can be done very easily and the benefit of doing so is not worth the effort.

    #2278687
    Pankaj

    Long time .

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to reduce excessive DOM size?’ is closed to new replies.