• I am having the same issue as described on the another thread with same title. See below. I am using load more button only, no pagination or infinite scrolling. Any ideas please??

    When I enter a product and return to the page where all the products are displayed, it does not return to the same place where I left it. The problem occurs when I am logged in but when I am logged out the problem does not occur, i.e. after returning from a product page if I relocate correctly to the point where I was. Any clue as to why this is happening?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    Unfortunately we do not have any solution to change how it work.
    Scroll position when goes back depend on browser functionality.

    Regards,
    Oleg

    The issue is not with the browser but with caching. By default, WP does not cache pages for logged-in users. Some plugins allow temporary caching for logged-in users, but they send headers as if the users were logged in.

    For example, the following header is sent for a logged-in user:

    cache-control: no-cache, must-revalidate, max-age=0, no-store, private

    cf-cache-status: DYNAMIC

    The issue can be partially resolved by adding the code below to the functions.php file. It sets a header for category pages and logged-in users that allows caching, but only in the user’s browser. Proxy servers (e.g., Cloudflare or other intermediary caches) will ignore this content.П

    add_action('send_headers', function () {
    if (is_product_category() && is_user_logged_in()) {
    header('Cache-Control: private, max-age=3600, stale-while-revalidate=86400');
    }
    });

    Please note that if dynamic content is generated for logged-in users, this solution may not work. However, it should work for most cases, so make sure to test it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.