Just trying to get my head round the finer points of the browser restrictions on making an XMLHttpRequest to a different domain - the same origin policy.
I've been told that this will not be a problem as long as the javascript files are loaded from the domain which will be receiving the call. i.e.
www.domain1.com hosts the file ajax.js which contains all Ajax functions
www.domain2.com/default.html includes the file www.domain1.com/ajax.js
I can't seem to find any clear reference to this set up being any more valid than if ajax.js was hosted on www.domain2.com (which would fail if it made a call to www.domain1.com).
Anyone happen to know if the host of the javascript source file makes any difference to the policy restrictions? (Before I launch into a load of tests.)
I've been told that this will not be a problem as long as the javascript files are loaded from the domain which will be receiving the call. i.e.
www.domain1.com hosts the file ajax.js which contains all Ajax functions
www.domain2.com/default.html includes the file www.domain1.com/ajax.js
I can't seem to find any clear reference to this set up being any more valid than if ajax.js was hosted on www.domain2.com (which would fail if it made a call to www.domain1.com).
Anyone happen to know if the host of the javascript source file makes any difference to the policy restrictions? (Before I launch into a load of tests.)
Comment