noahawaii Posted July 31, 2022 Posted July 31, 2022 Site URL: https://noahlangphotography.com/blog Lazy loading is hurting my seo, and I was wondering if there was a way to turn it off site wide.
tuanphan Posted August 3, 2022 Posted August 3, 2022 Try adding this to Design > Custom CSS body[class*="type-blog"] #page * { transform: unset !important; opacity: 1 !important; transition-delay: unset !important; transition: unset !important; } noahawaii 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
noahawaii Posted August 5, 2022 Author Posted August 5, 2022 (edited) On 8/2/2022 at 11:44 PM, tuanphan said: Try adding this to Design > Custom CSS body[class*="type-blog"] #page * { transform: unset !important; opacity: 1 !important; transition-delay: unset !important; transition: unset !important; } Just from doing my own test with this CSS, everything still loads in parts until the entire page appears which is what is hurting CLS in Google. So far I've found that the best solution is by creating a loading screen like the one below, but I'm not positive yet if this is what will satisfy Google CLS. From what I understand google needs to show that everything on the page isn't moving around as the user is watching it load. <div id="wm-loading-animation"> <div class="loading-graphic"> <img src="https://images.squarespace-cdn.com/content/v1/6226f62738f4f73d2b353e79/f7f0d350-1a95-4178-8aa6-39c05a527ef9/noahawaii.png?format=1000w"> </div> </div> <script> function hideAnimation(){ document.querySelector("#wm-loading-animation").classList.add("hide-animation"); } setTimeout(function(){ setTimeout(function(){ hideAnimation() }, 500); let checkLoad = setInterval(function(){ if (document.readyState === "complete"){ hideAnimation(); clearInterval(checkLoad) } }, 1); }, 1000); </script> <style> #wm-loading-animation img{ height:150px; width:auto; } #wm-loading-animation{ height:100vh; width:100vw; background:#fff; position:fixed; z-index: 99999999999999999999999999999999999; display:flex; align-items:center; justify-content:center; } .wm-slider-container .dots-container{ left: unset !important; transform: unset !important; right: 3vw } @keyframes pulse{ 0%{ transform:scale(1.1)} 50%{ transform:scale(0.9)} 100%{ transform:scale(1.1)} } .loading-graphic{ animation: pulse 3s ease-in-out infinite; } #wm-loading-animation.hide-animation{ visibility: hidden; opacity: 0; transition: visibility 0s 1s, opacity 1s linear; /*Hide this element after load*/ } </style> Edited August 5, 2022 by noahawaii
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment