WooCommerce geolocation is cache compatible, but not cache warmup compatible, because the detection of user’s location is IP based. This makes it impossible to warmup the cache. You can only solve this without geolocation detection by asking the visitor where he comes from if the page is loaded first and set a cookie with a value based of the user selection. This cookie can be used to warmup the cache. If you offer different content (prices) based on the location there is no other way for cache warmup, so yes, the crawler is useless in this situation.
Thread Starter
xbaeza
(@xbaeza)
Yep, makes sense. If I configure LiteSpeed like is explained here, deactivate Woocommerce geolocation (cache compatible) choose only Wocommerce geolocation, then, my question is if the crawler woud cache at least the location where the server is located?
So this way at least local language would be warmed up?
Many thanks,
I don’t think so. WooCommerce geolocation doesn’t check the location of the server, but the user’s location and only this location matters. This means, if you warmup the cache nobody can benefit of this warmed cache, because WooCommerce geolocation always adds a GET paramater to the url, but this will only work if a URL isn’t cached yet. If a URL is cached there is no more PHP and without PHP (WooCommerce geolocation) a requested URL cannot be redirected. This also means that you not only have a problem with warmup, but also with right caching and prices depending on user’s location and so on….
If your host supports LiteSpeed GeoLocation you can use it to provide different content (prices) with different cache vary (cache copy) depending on user’s location, but the warmup isn’t possible. For this you would need a server in every country just for warmup. To solve this tricky situation with cache warmup and geolocation you need a complete different solution like explained in my last post.