Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @miguelfspinto

    Thank you for your inquiry and I am happy to assist you with this.
    I’ve checked this and it’s always the same for me. Even in incognito, when I open the website it redirects to my geolocation.
    Can you please share what is the expected behavior on your end?
    ALso is the option Cache URIs with query string variables enabled in PErformance>Page Cache?
    Thanks!

    Thread Starter miguelfspinto

    (@miguelfspinto)

    Hi Marko,

    The problem is related with the cache of the first redirect.
    I can show you my screen.
    Can we schedule a quick call (google meet) to discuss this issue?

    Best regards,
    Miguel Pinto

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @miguelfspinto

    Thank you for the information.
    Sorry, this is a public forum so please share more details here.
    As I understand, the issue is that when you visit the https://maskk.com/ there is a first redirect i.e. https://maskk.com/?v=de, and then to the current location https://maskk.com/?v=yourlocation ?
    And the expected behavior should be https://maskk.com/ =>https://maskk.com/?v=yourlocation ?
    Can you please share if the option Cache URIs with query string variables enabled in Performance>Page Cache?
    Thanks!

    Thread Starter miguelfspinto

    (@miguelfspinto)

    Exactly. This happens because the first access after flush the cache was in DE (Germany).
    The option “Cache URIs with query string variables” in Performance > Page Cache is enabled.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @miguelfspinto

    Thank you for the information and confirmation.
    Can you please disable the option “Cache URIs with query string variables” in Performance > Page Cache, save all settings and purge the cache and see if the issue persists.
    Thanks!

    Thread Starter miguelfspinto

    (@miguelfspinto)

    Apparently, solved the problem. But in that case, the pages with v parameter would not be cached, right? And I want the pages to be cached, because all pages have now the parameter v.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @miguelfspinto

    Thank you for the information. Yes, you are correct, the pages with query string will not be cached in this case.
    Since version 2.4, WooCommerce adds an option to set the user’s location called “Geolocation with the page caching support”. When you activate this option WooCommerce fires a javascript redirection with an extra parameter v=xxxxx. This parameter causes cache invalidation, the new page (with the parameter) will cache separately. Please check the screenshot.
    This is the only option that may help in this case.
    I hope this helps!
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redirect when using geolocation with cache support in woocommerce’ is closed to new replies.