When trying to access a cross domain site via JQuerys AJAX method Chrome throws an error:
XMLHttpRequest cannot load http://somewebsite.com. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access
I understand CORS and why this occurring. What I am trying to do is save that exact error message into a javascript variable. I can't find anything in the response request error that has that messaging and I am thinking it is unique to the way Chrome handles AJAX requests?
The reason I am asking is because I am attempting to isolate the URL in the message since it is providing me the proper redirected URL form the AJAX. So for example if my AJAX call is hitting "http://somewebsite.com/redirect" the error that is thrown shows the actual redirected url, something like "http://somewebiste.com/trueURL". The true, end point URL is what I am trying to isolate to so I can link to it elsewhere.