I've done a lot of optimization and when I test my page I get different results all day long and different results just minutes apart.
Same page tested just minutes apart gives a variance between 94 > 61 (big variance) and anything in between. Server NOT under load nor are any of errors to do with that either.
One test will give me a CLS of 0.007 and 1 minute later the same test on the same page will give a CLS of .714 and sometimes 1.4 for the same page?
Secondly I have a live and staging site I get scores of 10+ on everything from the staging site versus the live site. They are mirrors of each other and everything is identical same web server, same config, same shared mariadb server, same php everything is the same.
Additionally today results from the staging site were much higher because no unused js or css errors were being thrown despite it being identical, both sites have all the same js all the same css. This is a reason the staging scores higher. Also nothing to do with cacheing either as I even disabled the CDN and WP Rocket on the staging site and it STILL scored higher than the live site.
I'm stumped.
2021-04-22 update 07h05 Morning tests give me a CLS of 0.005 for mobile and 0.002 for desktop. Repeat test 2 minutes later gives me 0.841 for mobile and 0.002 for desktop. I really need to try and understand why such a variance on the layout shift, I will eventually figure I out.
2021-04-23 I had mentioned I was getting a consistently higher score between my staging and live site. Today I figured out why. I have Bunny CDN disabled on my staging site, the moment I enabled it CLS gets worse and score drops. I didn't imagine this either, I turned the CDN on and off several times and immediately scores rise / drop. I then set the CDN to be reserved only for images and then its fine, the moment I allow the CDN to cache js & css the scores flop and CLS returns. How is this even possible?