• Resolved atomonelone

    (@atomonelone)


    Hi!
    I’m having a problem with the cache on my website. When using Edge or Chrome everything is working great, but if I use Safari or Firefox the load times are high and for some reason these two browsers are not getting served the cached version of the page from time to time.

    For example on Firefox the page header says Cache: miss and in the console it says: Page cached by LiteSpeed Cache 7.1 on 2025-05-22 09:13:52 (The same time I visited the page) on the same page using Edge I get a hit on the cache and it says this in the console: Page cached by LiteSpeed Cache 7.1 on 2025-05-21 10:49:04

    I have 4 crawlers active and they all have hits on all the sitemap pages so why is Firefox and Safari not getting served the cached version? Is this a known problem or is something wrong with my setup?

    Report number: KBPADPJR

    Thankful for any help with this.

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

    (@qtwrk)

    logically , firefox and safari have different user agent and request header , so it would be missed and not serving from same cache

    but now it wonders me if crawler should satisfy this

    I will run some test and get back to you.

    Thread Starter atomonelone

    (@atomonelone)

    Thank you for the quick reply @qtwrk
    Even if they have different user agents wouldn’t there be a way to still serve them the same cache?
    Since I have the crawlers active I thought everyone visiting should be getting hits on the cache after they have been crawled, otherwise there’s little help in caching the pages and running the crawler.

    Looking forward to your test results. Thanks for the help. πŸ˜€

    Thread Starter atomonelone

    (@atomonelone)

    Did you ever get a chance to look at this?
    I’ve tried adding Firefox and Safari under General Settings -> Tuning -> Guest Mode User Agents
    but that didn’t solve the problem. I was also thinking maybe it’s an issue with cookies from Complianz becasue of different cookies for the GDPR consent, but I can’t seem to get Litespeed to ignore these cookies, if thats even the problem? My idea was that it might use vary because of the different cookies but I have not added them to the vary option or anything like that.

    Plugin Support qtwrk

    (@qtwrk)

    I think it’s due to webp/avif vary

    the rewrite rule here:

    ### marker WEBP start ###
    RewriteCond %{HTTP_ACCEPT} "image/webp"
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
    RewriteCond %1 >13
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    RewriteCond %{HTTP_USER_AGENT} Firefox/([0-9]+)
    RewriteCond %1 >=65
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    ### marker WEBP end ###

    it has 3 conditions , if browser sends request header accept with image/webp , if browser gives user agent for iphone iOS newer than 13 , or firefox version newoer than 65

    but the crawler can only simulate the accept header , one request with image/webp and one without

    so the FF and Safari are not simulated by crawler.

    I am not sure what is the best solution to such issue , I will put a feature request to our dev , as create a “custom user agent” crawler or something like that , hopefully it can satisfy such situation.

    Thread Starter atomonelone

    (@atomonelone)

    Thanks for getting back to me.
    Would removing the rewrite rule be a temporary fix? I’m using another plugin for image optimization anyways.

    Plugin Support qtwrk

    (@qtwrk)

    then please try go to image optm setting -> Next-Gen Image Format to OFF

    Thread Starter atomonelone

    (@atomonelone)

    Hey @qtwrk
    I’ve done some tests and it seems to be working after disabling image optimization settings.

    Thanks for your assistance. πŸ™‚

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

The topic ‘Firefox and Safari not hiting cache’ is closed to new replies.