About four years ago, I wrote some JavaScript code that included an XMLHttpRequest request. It originally looked like this:
xmlhttp.open('GET', 'http://www.example.com/script.php?arg=val&sid=' + Math.random(),true) ;
However, since then the code has stopped working. I then made a change to the request to look like this:
xmlhttp.open('GET', 'script.php?arg=val&sid=' + Math.random(),true) ;
This modification fixed the issue and everything now works as expected on all major browsers.
My question is, has the same origin policy for Chrome and Firefox changed over the past four years in a way that required this XMLHttpRequest to be fixed? I recall that it used to work initially, but I am unable to go back in time to verify. I have not been able to find any documentation online that indicates a change in the same origin policy. I apologize if this is not the right forum for this question, but I am eager to understand why this behavior changed. A simple response like "Yes, there was a change" or "No, this should never have worked in the first place" would be helpful.