I would like to know this too, in another post you mentioned ajax/js wasn’t support yet (7 months ago), be great to know if this has been done now
-
This reply was modified 8 years, 10 months ago by
steveokk.
There’s an option in options that says
“X Disable caching a page that contains a shortcode or API call to geo-dependent functions.
At least WP SuperCache, W3TotalCache and ZenCache are supported.”
So that should work for you, although the cost of not caching a page this is used on might be “expensive” if on a home page for example, therefore not being cached. Or – worse – if in a header or footer that will stop the site being cached at all.
G
websanity is right, this is currently the only way to go …
Unfortunately, there has not been any progress on the AJAX feature … volunteers welcome 🙂 Grab the ajax branch, read the documentation and send me a pull request. I would give help if needed but otherwise it is not probable that I come to it this year.
does your plugin work with Ajax anymore?
Currently, the country information is rendered server side which collides with caching. AJAX support is planned: the HTML can then be cached, and the shortcodes will be replaced via JS in the browser.
More info and a workaround here:
https://ww.wp.xz.cn/support/topic/js-api/