Geo Text WordPress Plugin

W3TC and WPSC compatibility

The difficulty with caching plugins is that they don’t take account of dynamic content. So if you have different content shown to people from different countries, this can cause a problem.

If someone from the US visits your page before anyone else, the page would be generated showing the information for the US visitor. The caching plugin then caches this page, and the next time someone visits the same page, they will be shown the cached version. So a visitor from France would see the cached page, which has the information for the US visitor on it.

Thankfully WP Super Cache and W3TC, the two most popular page caching plugins do offer methods to get around this problem.

There are two different methods of compatibilty that can be used. How to use either method with both WPSC and W3TC is detailed further below, but here follows a brief explanation of the differences:

Page key modification changes the key that the caching plugin uses to store and retrieve the cached pages by adding the country code. This means that each page is cached separately for each country.

The other method is using dynamic or fragment caching. With this method the caching plugin caches most of the page, but continues to process the geoText and geoContent shortcodes on every single page load.

The page key modification method is much more efficient if you have geo content on many of your website pages as it minimises the extra amount of processing on each page load. However, it affects every page on your site, so if you have a lot of pages with no geo content, these pages will still be cached on a per country basis, despite there being no difference between the versions for each country.

Therefore, if you have a large website and are only using geo content on a few of your pages, it makes more sense to use the dynamic / fragment caching method instead.

See this blog post for some example diagrams showing the differences between no caching, caching, caching with page key modification, and fragment caching / dynamic caching: Differences between caching methods with Geo targeted content.

Compatibility with WP Super Cache

Please use the Dynamic shortcodes or Geo Targeting plugins for WP Super Cache.

Compatibility with W3TC

Please use the Dynamic shortcodes or Geo Targeting extensions for W3 Total Cache.

Posted on by xoogu, last updated

Leave a Reply