• Resolved kujain

    (@kujain)


    hi there!

    Hoping you can help me. I just activated lscache plugin on my site but evn after enabling js/css/html minification and combine and image lazy loading, nothing seem to be making a difference. I can still see asset files as separate, html is non-minified and images are not lazy loading. I went through troubleshooting steps on LT documentation site but none made any difference.

    Most plugins are disabled (with all being updated to latest versions). Hoping you help with this…

    Report: TJNMFVFL

    Thanks very much!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Did you put WP and domain into different URL ?

    like , WP is at https://domain.com/wp/ while site domain is set to https://domain.com/?

    you need to go to toolbox -> edit .htaccess , set front htaccess and backend htaccess accordingly

    otherwise caching won’t work

    I do see JS/CSS combined/minifed though

    Best regards,

    Thread Starter kujain

    (@kujain)

    Thanks for checking!

    I have using a slightly custom deployment of WP called bedrock which has been very useful for cleaner deployments and updates. Anyhow, for testing, I have moved off it to a standard WP install to hopefully debug this better.

    With this install, I am still not seeing the combined/minified content. I can see that the page itself is cached (header is hit,private) but the css/js files are still separate and non-minified. Same with the html itself as previously.

    I can see the js/css files have been generated in litespeed/cssjs folder but they dont seem to be getting used as per my devtools console.

    What could be wrong here?

    Here’s an updated report id: DJNWBEFH

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I do see the combined files in request list

    
    link: </wp-content/litespeed/cssjs/9232f.css?3a278>; rel=preload; as=style,</wp-content/litespeed/cssjs/c42f8.js?652b7>; rel=preload; as=script
    server: LiteSpeed
    vary: Accept-Encoding,User-Agent,User-Agent
    x-litespeed-cache: hit
    

    Best regards,

    Thread Starter kujain

    (@kujain)

    Thanks for checking!

    But I am not seeing this file being loaded and rendered in the frontend – it still shows the individual css files (all local files and same with js files) and none show gzip compression. Perhaps I am looking at the wrong place but usually these should have been replaced by the single css file: 9232f.css I believe.

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    what do you mean shows individual file ? please do me a screenshot

    from what I see, the requests are being brotli copressed content-encoding: br

    Best regards,

    Thread Starter kujain

    (@kujain)

    Thanks!
    Here’s a screenshot of the css files being loaded on the site. Instead of a single combined css file, individual css files are being loaded (all are local and enqueued). Same with js files.

    Screenshot link

    Thanks!

    • This reply was modified 3 years, 8 months ago by kujain.
    • This reply was modified 3 years, 8 months ago by kujain.
    Plugin Support qtwrk

    (@qtwrk)

    what page is that ?

    admin area ? was it login user or guest user ?

    Thread Starter kujain

    (@kujain)

    This is a page on the frontend (tested both when logged in and in incognito). here’s the url:
    https://portfolio.fredmarcus.visionstream.com/events/

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    okay , now please enable debug log

    it should state the reason why it bypass optmization

    Thread Starter kujain

    (@kujain)

    Thanks for the pointer!

    Enabling the log was definitely helpful. I can see the cache and the css/js minify/combine is working on some pages and the log details the configuration for them clearly. But the page I was using above for testing is still not working! I went through the load log for that page but not seeing any particular reason why should that be. Here’s the log excerpt related to that page – perhaps you can identify the issue?

    --------------------------------------------------------------------------------
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] ?? ------GET HTTP/1.1 (HTTPS) /events
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] Query String:
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] HTTP_REFERER: https://***/events/weddings/irina-and-leon/
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] Accept Encoding: gzip, deflate, br
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] Cookie _lscache_vary: logged-in:1;role:99
    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] X-LSCACHE: true
    03/06/21 12:42:25.381 [71.187.35.52:49544 1 bgD] [Ctrl] X Cache_control -> private ( logged in user )
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] ?? ------POST HTTP/1.1 (HTTPS) /wp-cron.php
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] Query String: doing_wp_cron=1615054345.4908049106597900390625
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] HTTP_REFERER: https://***/wp-cron.php?doing_wp_cron=1615054345.4908049106597900390625
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] User Agent: WordPress/5.6.2; https://***
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] Accept: */*
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] Accept Encoding: deflate, gzip
    03/06/21 12:42:25.625 [170.39.79.14:58124 1 fdZ] X-LSCACHE: true
    03/06/21 12:42:25.754 [170.39.79.14:58124 1 fdZ] [Router] get_role:
    03/06/21 12:42:25.755 [170.39.79.14:58124 1 fdZ] [Media] init
    03/06/21 12:42:25.756 [170.39.79.14:58124 1 fdZ] [LQIP] init
    03/06/21 12:42:25.757 [170.39.79.14:58124 1 fdZ] [CDN] init
    03/06/21 12:42:25.757 [170.39.79.14:58124 1 fdZ] ? Task init
    03/06/21 12:42:25.758 [170.39.79.14:58124 1 fdZ] [Router] LSCWP_CTRL bypassed empty
    03/06/21 12:42:25.758 [170.39.79.14:58124 1 fdZ] [GUI] init
    03/06/21 12:42:25.810 [170.39.79.14:58124 1 fdZ] [Img_Optm] cron_pull running
    03/06/21 12:42:25.810 [170.39.79.14:58124 1 fdZ] [Img_Optm] ? no need pull [tag]
    03/06/21 12:42:25.813 [170.39.79.14:58124 1 fdZ] [Core] CHK html bypass: miss footer const
    03/06/21 12:42:25.813 [170.39.79.14:58124 1 fdZ] [Ctrl] not cacheable before ctrl finalize
    03/06/21 12:42:25.813 [170.39.79.14:58124 1 fdZ] [Router] get_role:
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Vary] role id: failed, guest
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Router] get_role:
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Router] get_role:
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Vary] no custimzed vary
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] ?? X-LiteSpeed-Cache-Control: no-cache
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Core] CHK html bypass: miss footer const
    03/06/21 12:42:25.814 [170.39.79.14:58124 1 fdZ] [Media] bypass: Not frontend HTML type
    03/06/21 12:42:25.815 [170.39.79.14:58124 1 fdZ] GUI bypassed by no counter
    03/06/21 12:42:25.815 [170.39.79.14:58124 1 fdZ] [Optm] bypass: Not frontend HTML type
    03/06/21 12:42:25.815 [170.39.79.14:58124 1 fdZ] CDN bypass
    03/06/21 12:42:25.815 [170.39.79.14:58124 1 fdZ] End response
    --------------------------------------------------------------------------------

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    the log is incomplete

    03/06/21 12:42:25.369 [71.187.35.52:49544 1 bgD] ?? ——GET HTTP/1.1 (HTTPS) /events

    search on tag “bgD” , to get full list

    you can post it somewhere like https://pastebin.ubuntu.com/

    Thread Starter kujain

    (@kujain)

    yes – you are right! I missed some parts from the bottom. Here’s a link to the full log for this page:
    https://pastebin.ubuntu.com/p/HgcrpTYySf/

    In comparison, here’s the log for a page that did work:
    https://pastebin.ubuntu.com/p/jyfCjddjbs/

    Thank you!

    Plugin Support qtwrk

    (@qtwrk)

    this was the issue

    [Core] CHK html bypass: miss footer const

    the page didn’t call the wp_footer , when you miss this , LSCWP consider this page is somewhat incomplete , so bypass it

    since you got it work on other pages, maybe some plugin , widget or theme setting that unique to this page caused this ?

    Best regards,

    Thread Starter kujain

    (@kujain)

    Interesting! I checked if wp_footer was being called correctly and it was, even on this page. But as per you suggested, I started disabling all plugins ( i had turned off most before but some critical ones were on). And you are right – a plugin was blocking LSCWP to work properly, specifically on this /events page!

    This plugin is the All-in-One SEO – and that’s so strange since its a pretty well-known and popular plugin as it is! My config for AIOSEO is nothing out of the ordinary – so I really cannot understand why it was blocking LSCWP from working properly on this page in particular.

    I know debugging another plugin is not what you would do, but if you can provide pointers so I can look into this further, it would be very helpful!

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    you can check from our code here for how does it check footer

    https://github.com/litespeedtech/lscache_wp/blob/149973fdc01e5d38cdf0df20bea2006579fccd87/src/core.cls.php#L148

    well , I don’t know how to debug other plugin , but I can provide a workaround to force it pass this check

    add:

    if (strpos($_SERVER['REQUEST_URI'], "event") !== false){
    define( 'LITESPEED_FOOTER_CALLED', true );
    }

    into your wp-config.php , where event is the page URI that needs to be forced on

    Best regards,

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘LS-Cache doesn’t seem to be working at all’ is closed to new replies.