Autoptimize creates big renderblocking css file
-
Hi,
I have recently added Autoptimize to my site and I have noticed it creates a big render-blocking css file, which delays my LCP from loading.
is there any way to make it so it s not render-blocking, or to split it up somehow?
Thank you!
-
OK, so for some reason the is_front_page rule is not OK, can you click on “Edit” and replace the CSS with the one found at https://pastebin.com/gvDdeYyv and then click “submit” and “save changes”?
the pastebin link doesnt work:
Not Found (#404)
This page is no longer available. It has either expired, been removed by its creator, or removed by one of the Pastebin staff.
can you send it again please?
strange, tried again and indeed it does not seem to stick around. I’ve put it in a Github gist instead, can you try https://gist.github.com/futtta/03132a3d16c245638ae489293f03f1ad ?
thanks!
Pasted and submited that but it says:
Conditional Tags, Custom Post Types and Page Templates RulesTypeTargetCritical CSS FileActions
MANUALis_front_pageccss_8baf723b8f7e878450e9474df0d72bcc_R.cssEditRemove
1 of the above rules got flagged by criticalcss.com as possibly needing review. This is often due to font-related issues which can be safely ignored, but in case of doubt do a visual test or check for Cumulative Layout Shift issues in e.g. Pagespeed Insights.
Also, in the Rules section there s still only the ones Manually processed earlier today.
OK, checked pagespeed for your homepage and indeed no render-blocking CSS and no CLS either, 69 mobile and 100 desktop, see https://pagespeed.web.dev/analysis/https-mobileautomechanic-co-uk/asxwvxubuh?form_factor=mobile
now regarding the queue not being processed automatically, can you go through the steps described in this support article; https://blog.futtta.be/2023/03/17/how-to-fix-autoptimize-critical-css-cron-issue/
frank
yep, mine s in the past 🙁 hmm, so should i contact the host provider about this?
they said:
“MWP Cron are guaranteed to run, BUT they will not run exactly when scheduled and there may be as much as a 12 hour window before a scheduled event may run.
So if they have cron every 10 mins its quite possible they will get stuck on queue. recommended is hourly cron”
can i change it to 1 hour instead of Every 10 mins, like they suggest?
i tried to delete all the Job queues(i thought maybe they are too many and it got stuck), but when i refresh all the jobs are still there
changing from 10m to 1h will not make a difference; if their cron runs each hour, it should pick up the 5 10-minute cron jobs anyway. the job does not require an exact time, it just needs to get triggered.
that being said, you can change the schedule by defining
AO_CCSS_DEBUG_INTERVAL
in your wp-config.php, setting it to 3600 should do the trick 🙂re. clearing the job queue; you have to click on “save” at the bottom of the critical CSS settings page.
-
This reply was modified 4 months, 1 week ago by
Optimizing Matters. Reason: added info about clearing the job queue
could you please explain how i define that? I am not sure how to write that code. thank you!
sure; adding below to your wp-config.php should do the trick;
define( 'AO_CCSS_DEBUG_INTERVAL', 3600 );
so, you think that if i edit the wp-config.php like you mention, it should fix it? or you think that it wont make any difference?
I would try it if only to be able to reach out back to your host to tell them it’s now 1h and it still does not trigger?
In the mean time you can press “process manually” a bit more to generate more rules, but that’s a bit inconvenient isn’t it? :-/
they said that it s to do with my type of hosting (shared hosting)
that’s .. harsh (and unusual) :-/
-
This reply was modified 4 months, 1 week ago by
- You must be logged in to reply to this topic.