Forum Replies Created
-
AuthorPosts
-
September 25, 2025 at 9:33 am in reply to: Elements not loadng on page load – mobile devices #1489558
Hi Mike
I am currently testing individual JS files from inclusion in WP Rocket. The plugin is the reason why I have this behaviour so am now systematically going through a test phase.Interestingly, excluding the ones I have identified from being delayed (which also covers user input) breaks some of the theme functionality! So whaever I do it doe3sn’t seem to resolve the issue. So now I am trying to exclude a couple of files from the ‘deferred’ command so that it loads without delay.
However, at this stage I do not know if that simply means it’s there on the front end (on page load) but will not execute until the user interacts (touches or scrolls) with the screen. If that’s the case I am still at square one.
Will report back.
Many thanks
EdSeptember 18, 2025 at 10:55 pm in reply to: Elements not loadng on page load – mobile devices #1489373I activated the native WP Lazy Load after around 10 hours. At no point have I managed to get rid of the issue, either with or without some kind of Lazy Load function. So I will have to disable WP Rocket now, as you suggested, and test again.
Please keep this thread open if you would please Mike – so I can post back a yes or no.
Just found this on WP Rocket help:
“Delay JavaScript Execution improves performance by delaying the loading of all JavaScript files and inline scripts until there is a user interaction (e.g. moving the mouse over the page, touching the screen, scrolling, pressing a key, scrolling with the mouse wheel). ”
Looks like JS perhaps? Seems to fit the behaviour in my video… Out of interest – what JS script is requried to react to a mouse movement or screen tap? Maybe I can exclude it…
Many thanks
EdAbsolutely brilliant Mike!
Thank you very much indeed… I appreciate what you have done enormously.
All the best
EdHi Mike
I have done that but it still doesn’t work….// List of background images const images = [ "https://swarezart.com/wp-content/uploads/2025/07/HP-FIXED-IMAGE10-2.jpg", "https://swarezart.com/wp-content/uploads/2025/07/HP-FIXED-IMAGE-1.jpg", "https://swarezart.com/wp-content/uploads/2025/07/HP-FIXED-IMAGE.jpg" ];
Will update to a new password
Many thanks
Ed-
This reply was modified 3 weeks, 1 day ago by
Swarez.
Hi Mike
Thank you for the great update. I have done as you suggested but cannot get the images to appear. I tried relative paths and absulute paths for the images with no result.Pasted the contents of the code block to the functions.php file in the Child theme. Added the custom CSS class. No joy…
Any ideas?
Many thanks
Ed-
This reply was modified 3 weeks, 1 day ago by
Swarez.
September 18, 2025 at 8:51 am in reply to: Elements not loadng on page load – mobile devices #1489343Thank you so much Mike – I don’t know what I would do without you!!!
I have done those processes. Will give it a few hours and report back.
Ou of interest – if the issue lies with WP Rocket Lazy Load, would you advise turning the native WordPress LazyLoad back on intead and kepp WP Rocket disabled?Best wishes
Ed-
This reply was modified 3 weeks, 1 day ago by
Swarez.
Thank you so much Mike – that’s awesome, it solved the problem and thank you!!!
Shame though, that the special heading can’t be transferred over to an Easy Slider – I tried with the shortcode. It’s messy.
Any chance we coudl request the ability to add a second background image to transitionon (in a Colour Section elelement?)
Again, thank you
EdHi Rikard
Yes i did test on private browser windows and the problem remains.
So let me ask you – what script do you think might be missing that rpevents lthe lightbox from functioning until a refrseh is done?
I use Asset Cleaner pro which I use to strip out all the unessecary code from the theme – I haven’t unticked anything more since everything was working okay so it may be wise for me to go and check everything again.FYI – these files are excluded from WP Rocket and are active on Asset Cleaner pro:
http://swarezart.com/wp-content/themes/enfold/css/avia-snippet-lightbox.css
http://swarezart.com/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/image/image.css
http://swarezart.com/wp-content/themes/enfold/js/aviapopup/magnific-popup.css
Thanks
EdHi Rikard
Apologies for the delay
I have temporarliy disbanled WP Rocket and the issue still apears on some pages but not others. It all seems to come down to that first press or page refresh – once you do that it all works. Sam on the iPad… not sure what to do…
Many thanks
EdHi Rikard
Thank you for your prompt response – much appreciated…
I just set up a new iPad and the problem is there… I have shot a small video for you here.
Lightbox won’t function until some other action is complete. Fresh Safari on fresh iPad Pro.
many thanks in advance
EdHi Ismael
Thanks for your sugegstions.
I reached out to WP Rocket and they said I should exclude the CDN image in their exlcusion box. This does work but I will have to do it 250 times! Unless you have another solution??This process has also uncovered some potential theme issues which could be improved. I will open these on new threads
Thanks again
EdHi Ismael
Thank you for your replies.
I read the WP Rocket page son cahce control and checked the htaccess file against the recommendation from Wp Rocket and it matches – meaning that the plugin has lready written these cahe control settings. So that matches what they recommend. For example, image’jpeg and image’webp have “access plus 4 months” as a value, as per WP Rocket’s recommendations.
I do see however, that when I run a Pingdom test the image in this example only returns a cache lifespan of 7 days. I can’t find any setting within Cloudflare to change this. Why would the information not be read from the htaccess file?Back to the image though – I use RIOT compression and this has reduced the image to around 75kb. Further compression may help a little but 20KB may still result in an LCP issue. I think the problem is that we can’t override the LAZY LOAD. As far as I can see it is only Wp Rocket that is enabling it. There is nothing on Asset Clean Up Pro , nothing enabled in Advanced (images) and nothing enabled in the Enfold Theme. I even have a sitewide rule for WordPress to disable by defualt in the functions.php file.
So do you know what we can do next?
Thanks EdHi Ismael
Do you want to show me the rest of the page then?
The one screenshot shows the SITE averages, not the page score. The other screenshot doesn’t show how the score is calculated. If you scroll down a little further you will see that LCP is always RED!! This is a key metric for Google and has a negative impact on every page it crawls.
Let me know what your test says.
Mine is attached to show you what I mean.
regards
EdHi Ismael
I have inserted the code and cleared, purged and flushed everything (WP Rocket, Cloudflare, KeyCDN and old theme JS and CSS) but unfortunately nothing has changed.
The code that PSI returns still looks exactly the same and the LCP error remains.
Kidn regards
Ed-
This reply was modified 1 year, 6 months ago by
Swarez.
Hi Ismael
Thank you very much for responding.
I shall try this later. If it works then how do I roll that out for every image affected (currently over 250 on 250 individual pages)? I can’t put that code in every time I create a new portfolio item so is there a way to specify that the first image on any portfolio page needs to be pre-loaded?
Thank you for your time and energy
EdHi Mike
Thank you (as always) for taking the time an dtrouble to help me. I apologise for the lateness of my reply.
Thank you – that all seems to be working now. I appreciate your help once again!
Have a great day
All the best
EdOkay Mike, thank you for looking in to this.
I shall hope to hear back from you very soon when the Dev team come back with a solution
Kind regards
EdHi Mike
Thanks for coming back to me.
I have re-activated WP Rocket and removed the Authenticator QR code for logging in to the site.
Historically, having WP Rocket enabled never caused the issue with the hamburger menu – it was only when I changed the layout that I encountered this issue. I was still having it when I used Ismael’s code.
Now that WP Rocket is back on the problem has returned.
Nothing else I can see has changed from when it WAS working correctly – only the Enfold header layout change I mentioned above.
Thanks for looking into this for me.
All the best
EdHi Ismael
Thank you for the updates. I have tried what you suggested but sadly it hasn’t resolved the issue.
I have removed Wp Rocket and the issue remains – so can’t be a caching or minification problem. I can also eliminate the CDN delivering wrong file versions as this was triggered inside Wp Rocket.I have deleted old CSS and JS files from Enfold Performance tab too.
I have not made any changes to “header.php” or “helper-main-menu.php’.Interestingly though, if it helps, I only now have this problem since switching to a menu underneath the logo (centered). Previosuly I had a left logo with a smaller, right handed menu. Could this swap be causing an issue?
Would appreciate your help again please… this is bewildering to me.
Everything else was fine (with WpRocket running alongside all the other plugins) – this error only occured when i switched header menu layouts.I will leave off WPRocket today if that makes life a bit easier. Will post logins in the private area in case someone needs them.
Many thanks
Ed-
This reply was modified 2 years, 3 months ago by
Swarez.
What’s curious is, if you go here on your mobile:https://swarezart.com/limited-edition-prints/
The tap the screen the images shrink a little… so is it an animation conflict somewehre?
Every page is affected. A single touch brings it back – very odd?-
This reply was modified 2 years, 3 months ago by
Swarez.
Hi Rikard
Thank you for your help. I have tried that but it’s not working. Mobile behaviour is still the same. All caches flushed, CDN purged, Cloudflare purged, browsers emptied etc…You have to touch the screen or pull down to refresh before the hamburger menu icon appears….
Anything else perhaps?
Thanks
EdHi Mike
Thank you so much for taking the time and energy to fact check the issues with the Masonry element. i very much appreciate it.
The Blog element was no good so I have reverted back to the Portfolio element and that now remebers where you came from, so to speak. The styling isn’t great and the options for spacing aren’t there but it’s a workaeound for now.
Thank you again for your patience and time.
Regards
EdHi Mike
I think everyhting is back to normal now – I removed and re-installed Wp-Rocket and that seems to have done the trick! Maybe it doesn’t like being migrated? Who knowsThank you again for being here – you are my hero! Please close the thread.
Cheers
EdHi Mike
Firstly, thank you for coming back to me and also for solving the problem last time – it is very kind of you to reply back to me.
I was currently testing SG Optimizer and Asset Cleaner pro as an alternative to WP-Rocket which seems to have some issues. This is why the CLS issue had gone – as I was trialling another option.
However, i have now put WP-Rocket back on and deactivated the caching side of Asset Cleaner pro and all of SG Optimizer and so far the CLS issue seems to have righted itself – I assure I wasn’t dreaming this!
Am I okay to give it a few hours then do some other testing to see if thing have resolved themselves? I would like to leave this opnb while I do that.
Thank you again Mike because you are literally saving my life here!
Cheers
EdOctober 6, 2022 at 11:30 am in reply to: WooCommerce Description box doesn't open on page load #1367797Hi Nikko
Thank you so much for logging in and taking a look – it is very much appreciated.I’ll flush everything a little later (with your code snippet) and see what happens.
Worst case I’ll have to start manually going though everything but I’ll keep my fingers crossed that your code will do the job!
Thank you again for your generous support.
Regards
EdOctober 5, 2022 at 12:49 am in reply to: WooCommerce Description box doesn't open on page load #1367631Hi Nikko
My apologies regarding Google Authenticator – I have turned it off just in case you are able to spare any time to have a look – I completely understand if you haven’t though.The isolation of JS will take a long time owing to the amount of individual JS files contained within WooCommerce and Enfold. Is there any quicker way to determine what may be the cause? Like a debugger or something? This is where I get a bit lost but am trying!
Many thanks
EdOctober 4, 2022 at 7:57 pm in reply to: WooCommerce Description box doesn't open on page load #1367625Hi Nikko
Thanks for the quick reply.I applied the code, cleared caches and still the problem is there. Looks like it could be a WP-Rocket issue as when I disable that the problem goes away. When I re-enable it the issue returns. Basically, I get a flash of the description then it disappears. Very frustrating.
Any chance you could take a look please? I’m quite heavily on the ticked options in WP-Rocket but i could isolate the JS or CSS that governs this so that it is left uncached if necessary??
Logins sent in private section.
Thanks in advance
EdOf course Mike, no problem and thanks again!
EdThank you so much Mike – this is great and solves the problems.
I am really grateful to you for the time and effort you have put into this grid issue.Thank you again.
Will it be part of any upcoming release? Just curous.
All the best
EdHi Mike
Thank you for the updates.
I have put that CSS you suggested into the Customize location. I have purged all Clouflare assets and re-tested without WP-Rocket on and CLS was zero,I then enabled WP-Rocket and CDN delivery.and tested again – still zero CLS!
I then went through every setting on WP-Rocket and maxed out to my normal configuration then walked away for two hours while it recompiled all CSS, discarded the excess and pre-loaded all cached pages.
Now I’ve come back and tested ten random Portfolio pages (wthe ones with the paintings on in grid format) and we are still zero!!
I don’t want to be a curse here Mike but I think you may have fixed the problem… I noticed my two blue grids on the Homepage were suddenly massive but to be honest, I can live with that. I am now testing other page types including WooCommerce product pages. I am also looking for any layout anomolies across all page types.
I will report back tomorrow if I may so please keep the thread open. But so far every metric is green on Insights.
Back soonest and thank you for all your efforts in helping to resolve this problem. I almost can’t ebeliev it after two years of trying to fix this…
Many thanks
Ed -
This reply was modified 3 weeks, 1 day ago by
-
AuthorPosts