• Resolved caraid

    (@caraid)


    My websites are on shared hosting, so no server access.

    I wish to use a Geo-location plugin like “Custom Content by Country” to deliver different content to different users as follows;

    Example 1: Different widget banner adds to different countries

    Example 2: Some different in-line post content to different countries

    I guess I could enable ESI and set those widgets containing banner adds to not be cached. Can I do anything similar with WordPress posts, creating an ESI block via HTML tags or similar or would I just have to exclude the posts URL?

    Or is there another option ?

Viewing 1 replies (of 1 total)
  • Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi, @caraid

    Do you know much about how the plugin works? If it uses a cookie to determine what the user sees, you can create a cache vary on that cookie.

    In other words, you can cache a copy of each page for your visitors from England, and a different copy of each page for your visitors from Norway (for example). These would still be publicly-cached pages.

    You’d need to add a line to your .htaccess like this, where “geo-cookie” is the name of the cookie used by the plugin:

    RewriteRule .* - [E="cache-vary:geo-cookie"]

    We discussed a similar situation in this post recently. And this wiki goes into some detail about how it works.

    If the plugin doesn’t use cookies, ESI is a possibility, but if the visitors will see the same content repeatedly, it would be better to set them to private cache instead of no cache.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Geolocation options’ is closed to new replies.