Since this is a development issue, not an end-user / functionality issue, instead of focusing on getting AJAX for cross-domains, your development environment is configured as a proxy server to receive the latest data from production servers. It is really very easy to do.
You need to configure the web server in your development environment (if it is not already installed), and then configure the server to respond to 404 requests by fetching and then repeating production data. You can configure your server so that only AJAX data files are collected (otherwise, debugging other files will get confused if production assets start appearing on your development pages). Therefore, if http://dev.myserver.com/data/json/mydata.json missing, your 404 script will receive http://prod.myserver.com/data/json/mydata.json and repeat it to the client. The best part about this setup is that you can easily use mock data: if the file is present in your dev environment, your AJAX script will get this; but if you then delete or rename this file, you will get production data. This feature was so useful that I cannot recommend it enough.
If you work with XML, I would recommend duplicating the HTTP headers in 404. If your 404 process responds with Content-Type text/html , you will not be able to parse responseXML .
Andrew
source share