• Resolved stirate

    (@stirate)


    Hello,

    I currently have your plugin enabled and it works very well! The only issue is that it caches my login page and login modal (if the user doesn’t get sent to a dedicated login page). When these pages are cached and a user logs in with them, the login either doesn’t work at all or only works once they go to other pages. When cache is disabled through your plugin, everything works perfectly (when users login with the modal or dedicated login page, the pages refresh and they’re logged in correctly).

    The login modal is located at: https://website.com/#user_login_modal
    The dedicated login page is located at: https://website.com/account/login

    Sometimes, the login page will have a redirect as well, which looks like this:
    https://website.com/account/login/?redirect=https%3A%2F%2Fwebsite.com%2Fsubmit-listing%2F

    These are the lines I’ve added in the “Prevent the following URIs to be cached” section, and none of them seem to work.

    /*account/login*
    /*account/login/*
    *user_login_modal*
    /*login*

    I’d love to get the modal and dedicated login page (with and without redirects in the ?URL) to cache correctly, so I can continue to use this amazing plugin.

    Any help is appreciated!

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    first of all login modal cannot be bypassed as it’s nothing but a hidden content in the page that gets activated via JS when someone clicks on the button or something. So, you can’t tell a system that cache the page but don’t cache the modal.

    If you want that modal not to be cached, you need to bypass cache for that whole page.

    These are the lines I’ve added in the “Prevent the following URIs to be cached” section, and none of them seem to work.

    /*account/login*
    /*account/login/*
    *user_login_modal*
    /*login*

    – You have added wrong rules. If you want to bypass cache for https://website.com/account/login then the rule should be something like this:

    /account/login*

    Again as I said adding user_login_modal won’t help as that is not a query string with which the page loads and the system can see that the page has the user_login_modal query parameter so let’s Bypass cache for that.

    Instead, it’s added as an anchor jump – which mostly gets activated as someone clicks on a button or link and the JS does the rest.

    I hope this makes things clear.

    Thread Starter stirate

    (@stirate)

    Hello,

    That worked for the specific URL. Do you have any way to bypass cache on specific cookies? When the wordpress_logged_in cookie is set on my custom login modal (as referenced above), cloudflare still caches the page.

    I can confirm that when logging in through the modal, the wordpress_logged_in cookie does get set.

    Thank you for everything! Great support 🙂

    Plugin Contributor iSaumya

    (@isaumya)

    Do you have any way to bypass cache on specific cookies? When the wordpress_logged_in cookie is set on my custom login modal (as referenced above), cloudflare still caches the page.

    – If you have a site where general users gets to login to your site – it is highly recommended that you use the Worker mode instead of the default page rule mode and you will get those feature you have mentioned.

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

The topic ‘Cache Exception Rules Don’t Work’ is closed to new replies.