Effect of location detection on site performance?
-
Hi All,
I am working on a website using WooCommerce and I am using this code to send a message to users outside the USA:
<?php $userInfo = geoip_detect2_get_info_from_current_ip(); if ($userInfo->country->isoCode !== 'US'): printf( '<p>Message Text</p>'); endif; ?>
I want non-USA users to see the message on several pages (shop, product pages, cart, checkout). Since most users would visit the shop page first, I thought it might be more efficient to detect the user’s country on the shop page only and then pass the result to the other pages. Would this be practical? Does detecting location have a significant effect on site performance?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Effect of location detection on site performance?’ is closed to new replies.