FOUC when enabling CSS load asynchronously

#1
We are trying to reduce TTFB and enabling "Load CSS Asynchronously" improves it considerably.

The problem we face after enabling it is FOUC, Flash of Unstyled Content when loading the site.
Critical CSS generation on the background is enabled by I don't see pending jobs.

We are using Astra theme + Elementor, any advice to debug this is appreciated.

Just in case, I've sent the report number: TNFFHNTZ
Report date: 11/02/2019 07:20:26
 

qtwrk

Well-Known Member
#8
If you check your HTML source code

<style id="litespeed-optm-css-rules"></style>


the CCSS is not generated or inserted.

Please enable advance debug log with our server IPs and your admin , then purge all and purge CCSS, access your home page , then check the log , it should log something , and let's see what it says.
 

Unique_Eric

Administrator
Staff member
#15
Hi,

I just checked the ticket and found our support engineer already replied the ticket two days ago. Can you confirm if you can see the latest update?

Best,
Eric
 

qtwrk

Well-Known Member
#17
I don't have any update for that ticket.

Thanks!
Hi,

I replied the ticket few days ago , stating the debug log is not completed or correct , also the steps for how to grab the log but I did not receive any reply from you.

Please follow the steps I stated in ticket and provide the debug log again.

Best regards,
 
#18
Hi,

I replied the ticket few days ago , stating the debug log is not completed or correct , also the steps for how to grab the log but I did not receive any reply from you.

Please follow the steps I stated in ticket and provide the debug log again.

Best regards,
Where can I send the log?
 
#20
I am having the same problem. I enabled that load CSS Asynchronously and my site flashes unstyled now for a second. I understand the first visit should be like that, but it seems to keep happening even if I keep coming back and visiting. I set all the setting beneath that too on, as they are meant to be. I checked the litespeed-optm-css-rules and it is filled with styles. So its as if it hasn't generated ALL the critical CSS.

Also its worth noting that sometimes it loads fine and other times I see it unstyled for a second. Which i cant understand, but hopefully, it triggers a thought for you...

I did this debug as you asked of the OP above... not sure if it'll help...

02/20/20 17:31:56.224 [109.155.35.251:44896 1 k4b] ------GET HTTP/1.1 (HTTPS) /
02/20/20 17:31:56.224 [109.155.35.251:44896 1 k4b] Query String:
02/20/20 17:31:56.501 [109.155.35.251:44896 1 k4b] [Router] get_uid: 0
02/20/20 17:31:56.501 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:56.502 [109.155.35.251:44896 1 k4b] GUI init
02/20/20 17:31:56.541 [109.155.35.251:44896 1 k4b] [Ctrl] X Cache_control init on
02/20/20 17:31:57.730 [109.155.35.251:44896 1 k4b] [Core] Footer hook called
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Core] Footer check passed
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Vary] role id: failed, guest
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:57.773 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] X-LiteSpeed-Cache-Control: public,max-age=2592000
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] X-LiteSpeed-Tag: 16d_front,16d_URL.6666cd76f96956469e7be39d750cc7d9,16d_F,16d_Po.7,16d_PGS,16d_
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] [Core] Footer check passed
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] [Media] finalize
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] [Router] get_role:
02/20/20 17:31:57.774 [109.155.35.251:44896 1 k4b] [Optm] start
02/20/20 17:31:57.777 [109.155.35.251:44896 1 k4b] [Optm] separate css to 2
02/20/20 17:31:58.551 [109.155.35.251:44896 1 k4b] ******[Optmer] minify_js bypass due to type: application/ld+json
02/20/20 17:31:58.607 [109.155.35.251:44896 1 k4b] CDN _finalize
02/20/20 17:31:58.610 [109.155.35.251:44896 1 k4b] End response
--------------------------------------------------------------------------------
 
Last edited:
Top