I'm writing a JavaScript client application that uses the XMLHttpRequest object to fetch XML data from a server. However, all browsers except IE7/8 deny the request due to security concerns as outlined in the Same Origin Policy. It's important that this application works in IE, FF, and Chrome when run as a local file.
I've found success in Chrome when I use the --disable-web-security
flag, but I can't imagine clients laughing it off when I say "Oh, make sure you disable web security or else it won't work."
I'd reall开发者_如何转开发y appreciate some help!
EDIT: I don't have access to the server the XML comes from.
You may build a kind of proxy, a serverside application somewhere on the web, which retrieves the XML and delivers the xml inside a javascript-file.
精彩评论