I would like to know if Same Origin Policy role would apply also for IP address. In my specific case I need to get some xml data using JavaScript (jquery .ajax()).
SERVER 192.168.1.160
CLIENT 192.168.27.67
In case Same Origin Policy role applies, what is the best approach to get my XML data? Please consider that the source data is XML not a JSON that could be easily wrapped in JSONP.
Thanks for your time.
Without being able to use JSONP, one alternative I have used with asp.net web services (asmx) would be to set up a server side page to act as a proxy page on the server/ip that you are running your jQuery code on. This is achievable in any server side language.
When the proxy page is requested in your jQuery ajax methods, the proxy page would need to perform an HTTP post or get to the page on the alternate/external ip. This would return the XML to the proxy page, which would make it available to you locally.
**Please note that this assumes the remote page is simply returning the XML as a string. You may need to add request parameters to access (username, password), and the proxy page may also need to parse the returned XML to strip out any other output from the page).