• Resolved asafm7

    (@asafm7)


    Hello.

    When setting a partial match for excluding a cookie – for example yith_wcwl_ (for yith_wcwl_session_ee395c1c7ef6e2466e1f400f5fa31c9a) – a request with the cookie is being missed (instead of no-cache), cached, and shown to other visitors.

    Can this be avoided?

    I think it is possible with most other caching plugins.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter asafm7

    (@asafm7)

    The cache is always missed for the cookie, even if the page is already cached.

    This means that re-caching is forced on every page load with the cookie.

    It also means that the rewrite rule does recognize the cookie. But, for some reason, it treats the cache as expired and misses it, instead of bypassing it.

    • This reply was modified 9 months, 4 weeks ago by asafm7.
    Plugin Support qtwrk

    (@qtwrk)

    are you talking about Cache -> Exclude -> Do Not Cache Cookies ?

    please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    Thread Starter asafm7

    (@asafm7)

    Thanks, @qtwrk.

    Yes, I do talk about?Cache -> Exclude -> Do Not Cache Cookies.

    Report number: ANYLHOWY

    Plugin Support qtwrk

    (@qtwrk)

    what’s this cookie about ? testim

    Thread Starter asafm7

    (@asafm7)

    Hi @qtwrk

    It is for bypassing cache for automated usability testing.

    Do you think it is related to the issue?

    Thanks.

    Plugin Support qtwrk

    (@qtwrk)

    no , just asking

    how do I reproduce the issue ? I added a hobby to wishlist but cache still works on me

    Thread Starter asafm7

    (@asafm7)

    @qtwrk

    Because of the cookie issue, I’m currently using Ajax with the wishlist. This, however, has other limitations.

    You can test it using the other cookie you asked about.

    In the browser devtools, set a cookie named testim123 and refresh.

    Screenshot 2024-02-01 102528.png – OneDrive

    This is the result:

    Screenshot 2024-02-01 102456.png – OneDrive

    Plugin Support qtwrk

    (@qtwrk)

    if I do testim , it gives me x-litespeed-cache-control: no-cache , if I do testim123 it keep give me x-litespeed-cache: miss which is literally same effect as no-cache

    Thread Starter asafm7

    (@asafm7)

    Thanks @qtwrk.

    no-cache and miss don’t have the same effect.

    When a request misses the cache, the page is being re-cached (instead of not-caching, which is what no-cache does).

    You can verify it using the HTML comment:

    https://1drv.ms/i/s!AhEX_VIY1-zfhZoOGac0gr1UVYHslg?e=jNlmcR

    This means that a page (or a page state) that should’ve been excluded from cache is being cached, and presented to other users.

    I verified that this is the case:

    • I added a product to the wishlist
    • I refreshed the page
    • The cache missed, and the page got re-cached
    • I visited the site fron anther private browsing window
    • The product was shown as added to the wishlist, and no cookie was set

    You won’t be able to reproduce it now on my website, as I changed the wishlist to use Ajax.

    The bottom line is that no-cache and miss aren’t the same.

    Plugin Support qtwrk

    (@qtwrk)

    from PHP side , they are same , they both need to send to request to PHP to regenerate the page

    and please use the full-cookie-name

    Thread Starter asafm7

    (@asafm7)

    Thanks @qtwrk.

    As I explained, they are not the same.

      A response to a no-cache request isn’t being cached. You can verify it.

      I did:

      https://1drv.ms/i/s!AhEX_VIY1-zfhZoPsn-e7kFHMsMcWA?e=hBjhYa

      Thanks.

      Plugin Support qtwrk

      (@qtwrk)

      yes I know what you meant , but when it keeps miss , that means despite it is set to cache but it failed to cache it , so it will regenerate again by PHP , just like no-cache , the process , the data , is same and freshly generated , you can verify by the timestamp there.

      it’s like you throw a ball to a hole , the no-cache case is just like the hole is clean , and with keep miss , it’s like there is a web in front of hole and try to catch the ball but it never success and ball comes through the hole as no-cache case , the process is bit of different but end result is same

      and if you want to get no-cache , please use the full cookie name , partial match doesn’t work here.

      Thread Starter asafm7

      (@asafm7)

      Thanks @qtwrk.

      The thing is that it doesn’t fail to cache, it succeeds.

      Indeed, the person with the cookie will always miss the cache. But, on every miss, the page is cached, and this cache is presented to other visitors, who don’t have the cookie.

      This means that private content can be shown publicly (regardless of my specific issue).

      Can you please test and verify it?

      Plugin Support qtwrk

      (@qtwrk)

      if it keep misses that means it never saved into cache but it tried to do so

      I don’t think it will mess up the cache between users in such case

      and you need to use full cookie name in that setting to get no-cache

      Thread Starter asafm7

      (@asafm7)

    Viewing 15 replies - 1 through 15 (of 16 total)
    • The topic ‘Partial match cookies are missed, but cached’ is closed to new replies.