IP2Locationm, AJAX Requests etc being cached – Help with ESI
-
Hello,
We have developed a large site that uses AJAX quite heavily to pull in web forms for the user and we are also using WPML. What we are finding is that say for example someone on the UK English site requests the enquiry form, they get returned the UK English string translations, which is fine. But if a German user on the German part of the site also requests that form, they get the form with the English string translations not the German ones. It’s like the AJAX request has been cached.
We also have problems with Geolocation, we’re using IP2Location and in PHP we query the local database for the location and then using a localised Javascript file insert this into a localised variable for us to use. But sadly it seems that whatever the site language was at the point the GeoIP Location was derived during the cache period, that response is what is always served up to the user regardless of actually where they are.
We believe the solution to this is ESI, but I am a complete newbie at ESI and I wondered if someone could help either with this problem or point me in the direction of some documentation. I have tried implementing some code I found but it didn’t work.
As I say the issue isn’t just with IP2Location, but also with AJAX requests in general.
Many thanks.
- The topic ‘IP2Locationm, AJAX Requests etc being cached – Help with ESI’ is closed to new replies.