• Resolved Trieu Vy

    (@zztalano1zz)


    Hi everybody.

    I am using the wpDiscuz plugin to replace the default comment feature of WordPress and I discovered that Litespeed Cache unsets the comment cookie. Make my site not save the information entered by the user into the comment form (such as name, email, website), everything will disappear after I reload the page.

    I sent support for wpDiscuz this problem, you can see here.

    Report number: BGRQVQIB

    • This topic was modified 6 years, 3 months ago by Trieu Vy.

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

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

    (@qtwrk)

    Hi,

    If these values are stored in cookie, then please try edit your .htaccess,

    add:

    RewriteRule .* - [E=Cache-Vary:COOKIENAME]

    replace COOKIENAME to your cookie’s name.

    after

    RewriteRule .* - [E=Cache-Control:no-autoflush]

    and see how it goes?

    Best regards,

    Thread Starter Trieu Vy

    (@zztalano1zz)

    Hi @qtwrk
    I added the following to the .htaccess file

    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    RewriteRule .* - [E=Cache-Vary:comment_author_{HASH}]
    RewriteRule .* - [E=Cache-Vary:comment_author_email_{HASH}]
    RewriteRule .* - [E=Cache-Vary:comment_author_url_{HASH}]
    </IfModule>

    But the information I entered was lost after I refreshed the page.
    Report number: VLNRSDOH

    • This reply was modified 6 years, 3 months ago by Trieu Vy.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Please remove the added code , it’s not solution.

    I found the problem.

    without the rewrite rule I sent you:

    Page is generated before the cookie is created , so regardless what value the cookie has, it will not read , as it’s cached already.

    with the rule I sent you:

    I just did some test, that rule means: if this cookie exists , than run PHP and creates new copy of cache.

    I just confirmed the rule is actually working , I can see different copies for same page with and without cookie by verifying the timestamp.

    However, in theory , the new-cached-copy does hit PHP first , and then store it as cache, I don’t know why it doesn’t read the cookie value into page.

    I will continue to look into this issue.

    Best regards,

    Thread Starter Trieu Vy

    (@zztalano1zz)

    All right! I hope you will find a solution to this problem of mine.
    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Litespeed Cache unsets comment’s cookies’ is closed to new replies.