Mutation Events in script
-
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=0It basically says;
1. Mutation Events, however, present major performance problems
2. you should use the MutationObserver interfaceIs this an error on litespeed cache plugin, or something that can be improved so it functions the same (is upgraded) and I don’t get this dareboost error?
If you can advise please.
Many thanks in advance.
Best regards
IHThe page I need help with: [log in to see the link]
-
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_25ecf85eaa0612f4bc6f978c4I attach screenshot of what was returned under this flagged error
https://www.dropbox.com/s/0hdz3qg6pj2u3iw/avoid-mutation-events.jpg?dl=0Not sure what to make of this?
Any ideas qtwrk?
I haven’t a scoobies 🙁Is it an error in LSC?
And still the question is, how to get over it?
I haven’t a clue. 🙁Many thanks for your reply qtwrk
Best regards
Ian HHi,
Actually your theme uses Mutation Events
you need to fix it from source.
Best regards,
Hi qtwrk,
I’ve contacted Avada support,
I’ll see what they come back with.thanks for all your help
All the best qtwrk
Ian HHello 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 underAvada -> 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_optmAnd got this
https://www.dropbox.com/s/5o8ctv7wlyy1oop/still-error.jpg?dl=0So this is with Avada theme lazyload images DISABLED, but Litespeed Lazyload enabled..
Strange…I’ll contact their support again
Just thought I’d update you qtwrk
Many thanks for all your help here,
greatly appreciated
Best regard
Ian HHi,
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
I’ll look now before I reply to Avada supportMany thanks again
Cheers qtwrk
Ian HJust to add
https://www.dropbox.com/s/ons3u09t24qgvo3/performance-screen-avada.jpg?dl=0Thats my performance screen settings in Avada.
The js compiler is off here.
Just thought I’d share this screenMany thanks again qtwrk
Ian HHi 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_35ed1518d63b258770015fbf6Now 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 doesn’t 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=087% 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 doesn’t 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 haven’t a clue, all this is above me Qtwrk.But the above is where I am now
Man y thanks again
Best regards Qtwrk
Ian HHi 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<o;t++){var e=$cfs.children().eq(gn_getItemIndex(t*i,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}
———————————————————————-
My question to you now Qtwrk is what to do next!:-)
As I would prefer js minify on, but not flagging an error in DareboostMaybe I’ll contact Avada support with my latest findings also, and see what they say
Many thanks Qtwrk
Just thought I’d update you
Cheers
Ian HJust to add,, this report was here
(With js minify turned on), so flagging the error
https://www.dareboost.com/en/report/a_15ed15e3690b9982ec5b73224?reportIds=a_15ed15e3690b9982ec5b73224And my latest report,, before I turned on js minify
Currently
91%
https://www.localseo.ltd/
Report generated on May 29, 2020 8:04:14 PM
https://www.dareboost.com/en/report/a_35ed15cae63b258770015ff28?reportIds=a_35ed15cae63b258770015ff28Cheers Qtwrk
Ian HHi Qtwrk,
I think the error is now gone.I did write above something about “Avoid DOM manipulation inside loops with jQuery”
But that wasn’t my original problem, which was about,
“Mutation Events”So I think all is good now.
many thanks for all your help
Best regards Qtwqrk
Ian HAll sorted now Qtwrk,
Many thanks for your help hereBest regards
Ian H
The topic ‘Mutation Events in script’ is closed to new replies.