I have a requirement whereby I need to determine which of our 2 LS servers is the quickest for a client, and subscribe to it accordingly. This is so that, at a very basic level, our Asian clients get data from our Asian server, and our EMEA clients from our EMEA server.

In theory, I want to poll each LS server from the client using AJAX for a set time period, take an average, and save the quickest result. However, as our site is hosted on www.example.com, and our LS servers are at push.example.com and push-hk.example.com, and AJAX does not allow cross subdomain requests, I have found myself looking at implementing a dynamic iFrame solution.

From looking at the Lightstreamer JS code, it looks like you've had to think about this problem too (LS_AJAXFRAME, ajax_frame.html, etc.), however the JS code is obfuscated and not very easy to read.

Could you suggest an easy way for me to poll the LS servers using your AJAX iFrame JS code please? Or if you've come across this scenario before and have any better suggestions that'd be great.