• Resolved eissert

    (@eissert)


    Hello,

    We noticed that even the caching, the site was taking more than 3 seconds to load and this despite all the optimizations we did. It seems that the home page is not cached. Can you help us to optimize better?

    Best,

    Erika

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter eissert

    (@eissert)

    Here the report number : KLUEJXKX

    If homepage takes longer to load, then this is a result of your language depending redirection to another URL and if there is a redirection there is no cache available. Otherwise your redirection wouldn’t work.

    Thread Starter eissert

    (@eissert)

    Is it an issue that concerns all pages or just the homepage ?

    I don’t know how this language plugin works, but if it checks the language it will do it the redirection on every page. Therefore the redirection is not cached regardless which URL is requested.

    There are 2 ways to solve it. The first would be that you don’t do a redirection and a user has to select the language he needs. The second is a bit more complicated. LiteSpeed has Geo IP function that works together with LScache. For this you must study LiteSpeed documentation.
    https://docs.litespeedtech.com/lsws/cp/cpanel/geoip/

    Plugin Support qtwrk

    (@qtwrk)

    from what I see , your homepage has x-litespeed-cache-control: no-cache

    and for multi-language , it is better to use server-level GeoIP detection to differentiate and vary cache

    or use browser’s Accept-Language header by rewrite rule , e.g.

    
    RewriteCond %{HTTP:Accept-Language} ^en [NC]
    E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+is_en
    RewriteCond %{HTTP:Accept-Language} ^es [NC]
    E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+is_es
    
    Thread Starter eissert

    (@eissert)

    Hello,

    Thanks for your reply both,
    I’ve already used the browser’s Accept-Language header for the redirection.

    # BEGIN LITESPEED CACHE
    RewriteCond %{HTTP:Accept-Language} en [NC]
    RewriteRule .* - [E=Cache-Vary:%{ENV:LSCACHE_VARY_VALUE}+english]
    
    RewriteCond %{HTTP:Accept-Language} fr [NC]
    RewriteRule .* - [E=Cache-Vary:%{ENV:LSCACHE_VARY_VALUE}+french]
    
    RewriteCond %{HTTP:Accept-Language} de [NC]
    RewriteRule .* - [E=Cache-Vary:%{ENV:LSCACHE_VARY_VALUE}+german]
    #END LITESPEED CACHE

    But as you saw, it keeps not caching the homepage. I think I have to check the server-level GeoIP detection.

    Thanks for your assistance.

    Best,

    @eissert

    Homepage is cached, but as I already tried to explain, the page that redirects to the language depending URL can’t or may not be cached to do the redirect. You can see this if you check the requests in browser dev console.

    rewrite rules for cache varies don’t force caching behaviour. It is only a vary.

    btw, your Guest Mode function doesn’t work. It seems there is any security plugin installed that prevents accessing guest.vary.php

    Plugin Support qtwrk

    (@qtwrk)

    then please use debug log , the log will state the reason

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Force caching Home page’ is closed to new replies.