We’ve made changes to our Privacy Policy which is effective from Jan 13. You can take a look to it in here
You are here:
Ajax mode was conceived in order to make the Geotargeting plugin compatible with all cache plugins around. Once enabled, the shortcodes, geotargeted posts or products, redirects,etc will be updated after the page it's loaded by doing an AJAX request with Javascript. Thanks to this we are able to bypass the page cache generated by plugins.
Also AJAX mode it's needed when you use GPS Geolocation because the browser use javascript to get user's location.
Important:
The difference between this mode and regular mode is that the user sees the page for a second or less. Then, a full screen overlay it's presented to inform that he is being redirected to the right page.
The difference between this mode and regular mode is that the user sees the page for a second or less.Then, a full screen overlay it's presented to inform that the page it's not available to the user.
When ajax mode it's enabled the plugin will get a list of all posts of the site where you added geolocation even if not the queried page. This happens so those pages can be removed from widgets or similar elements. If you want to save requests because you know this functionality it's not needed you could add the following filter:
add_filter( 'geot/get_geotargeted_posts_pass_id', function( $pid, $ajax_data ) {
// will save requests in all single pages and posts that are not geotargeted
if( $ajax_data['is_singular'] ) {
return $ajax_data['pid'];
}
});