Wordpress LScache Plugin: Mutation Events in script
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello Support! I just ran a website audit on my website and got an error which references 2 litespeed cache files. I was wondering if there is any way to get over this please? I have a screenshot that describes it all, image is here https://www.dropbox.com/s/jqqgxa19rkk9r4l/litespeed.png?dl=0 It basically says 1. Mutation Events, however, present major performance problems 2. you should use the MutationObserver interface Is this an error on litespeed cache plugin, or something that can be improved so it functions the same (is upgraded) and I dont get this dareboost error? If you can advise please. Many thanks in advance. Best regards IH The page I need help with: https://www.localseo.ltd Hi, What if you run audit on URL https://www.localseo.ltd/?LSCWP_CTRL=before_optm , does this error still show up ? Best regards, Hi Support, Many thanks for getting back to me on this. The report I ran is here, https://www.dareboost.com/en/report/a_25ecf85eaa0612f4bc6f978c4?reportIds=a_25ecf85eaa0612f4bc6f978c4 I attach screenshot of what was returned under this flagged error https://www.dropbox.com/s/0hdz3qg6pj2u3iw/avoid-mutation-events.jpg?dl=0 Not sure what to make of this? Any ideas qtwrk? I havent a scoobies Is it an error in LSC? And still the question is, how to get over it? I havent a clue. Many thanks for your reply qtwrk Best regards Ian H Hi, Actually your theme uses Mutation Events https://i.imgur.com/x5mUFLl.png you need to fix it from source. Best regards, Hi qtwrk, Ive contacted Avada support, Ill see what they come back with. thanks for all your help All the best qtwrk Ian H Hello qtwrk, I got a reply from support which was as follows ================================================== I am sorry for the inconvenience, according to the report you have shared, the lazy loading script is causing the mutation events, for now, to fix this issue, you can disable lazyloading from theme options under Avada -> Theme Options -> Performance -> Enable Lazy Loading If you disable this option, the script will not load and there will be no mutation events. You can check the LiteSpeed cache plugin if it has the lazyloading feature that is implemented using mutation observers. =================================================== So, I have disabled the Avada lazy load in their theme options, and enabled it in litespeedcache. (then I purged all). I ran another dareboost report here https://www.dareboost.com/en/report/a_25ed1478da0612f4bc6fa0487?reportIds=a_25ed1478da0612f4bc6fa0487 But I still get the same error? https://www.dropbox.com/s/qjbguad78ncowza/error.jpg?dl=0 So I ran again with your litespeed URL https://www.localseo.ltd/?LSCWP_CTRL=before_optm And got this https://www.dropbox.com/s/5o8ctv7wlyy1oop/still-error.jpg?dl=0 So this is with Avada theme lazyload images DISABLED, but Litespeed Lazyload enabled.. Strange? Ill contact their support again Just thought Id update you qtwrk Many thanks for all your help here, greatly appreciated Best regard Ian H Hi, You can disable the JS combine , JS minify for the time being during this troubleshoot , it will make you easier to read where is the source of it. Best regards, Thanks qtwrk for your quick reply Ill look now before I reply to Avada support Many thanks again Cheers qtwrk Ian H Just to add https://www.dropbox.com/s/ons3u09t24qgvo3/performance-screen-avada.jpg?dl=0 Thats my performance screen settings in Avada. The js compiler is off here. Just thought Id share this screen Many thanks again qtwrk Ian H Hi Qtwrk, I have turned off js combine and minify, and ran a report on this URL at dareboost https://www.localseo.ltd/ Report is here https://www.dareboost.com/en/report/a_35ed1518d63b258770015fbf6?reportIds=a_35ed1518d63b258770015fbf6 Now with no flagged error for mutation,, but,, the js combine and minify are both disabled :-(,, but dareboost score went up to 90% I just tried it with re-enabling them both, and got the error again. So now I have enabled in Avada under performance this =================== Enable JS Compiler By default all the javascript files are combined. Disabling the JS compiler will load non-combined javascript files. This will have an impact on the performance of your site. =================== Doing it this way doesnt flag dareboost and keeps my gtmetrix score quite high (though the ySlow Use cookie-free domains) has quite a few entries Image below https://www.dropbox.com/s/q6i5ppfdamtg6gg/gt.jpg?dl=0 87% Report generated on May 29, 2020 7:29:46 PM https://www.dareboost.com/en/report/a_15ed1549a90b9982ec5b72e57?reportIds=a_15ed1549a90b9982ec5b72e57 ??????? But my question must be how come litespeed doesnt flag an error when js combine and minify are both turned off, yet it does flag the mutation error in dareboost when these are both turned on? Any ideas Qtwrk? I can provide a report or even wordpress login if you think it might help to find out why LS does this, flags the error when js is on? I havent a clue, all this is above me Qtwrk. But the above is where I am now Man y thanks again Best regards Qtwrk Ian H Hi qtwrk,, Getting somewhere, After Playing about with settings I now (I think) have found the error. I enabled js minify in LS and ran a dareboost report,, (with js combine in LS turned off) but JS Compiler turned on in their theme options. Dareboost has come back with this code, ======================================== Avoid DOM manipulation inside loops with jQuery Working directly with the DOM has a cost. If you have to add elements to a node, you should prefer to append them once rather than one by one. ???????????????????????- This page contains 1 DOM manipulation method(s) inside loop(s): https://www.localseo.ltd/wp-content/litespeed/cssjs/5b6b1.js for(var t=0 t
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference