Reduce DOM size and JavaScript
S
Suhail S
Recently google update makes it important to reduce DOM and make things faster
L
Lucas
Reduce DOM size is important for this time!!
Tobias Conrad
Suhail S is your goal also to improve Google page speed?
S
Suhail S
Tobias Conrad: there are some parts in the code where you are adding lot of extra "css class" based on the options we choose in the UX builder. A simplest form where we can strip the classes and thus reducing the DOM. This classes some people may need to do custom CSS so we can have like "tick box" to turn on/off as per client requirement
BEFORE STRIP
"
product-small col has-hover product type-product post-156989 status-publish first instock product_cat-zircon product_tag-200918-13400 has-post-thumbnail sold-individually purchasable product-type-simple woovr-active
"
AFTER STRIP
"
product-small col has-hover product first product-type-simple
"
that is alot of words that has been removed. You dev team may understand this better than me though which to remove and which not to remove.
Tobias Conrad
If your goal is to improve pagespeed please move your votes to this post https://uxthemes.canny.io/flatsome/p/page-speed-improvements
S
Suhail S
Tobias Conrad: will do thank you very much
S
Suhail S
Tobias Conrad: and remove jquery if possible. I do not need any fancy bounces.
Evgeniy Orlov
Suhail S: I think you misunderstand the question. The DOM depth isn't an amount of classes, but the amount of nesting steps, like <div><div><p><span><span><span><span><span><span><span>CONTENT</span></span></span></span></span></span></span></p></div></div>
CSS classes just help to style elements - their amount can be any without performance issues. But the DOM nesting forces the browser to build a very deep and sofisticated DOM tree - which is a performance bottleneck.
Gerald Essers
Yes, great request +1, we are having issues with this too. Our whole website is optimized, only DOM size stays too large.
tayfunkazanci@hotmail.com
Gerald Essers: I'm very interested in how you optimize the entire site. I wonder if the mobile side of the site is optimized
P Mo
you need to understand what DOM is. you can't optimize DOM size and have tens of items on a page .. each element counts, so if you want to stay below recommended size, you need to delete all elements that are not mandatory and just take up space (typically because you feel the page is empty, so you put junk everywhere)