javascript - Historical changes to same origin policy with XMLHttpRequest requests -


i wrote javascript 4 years ago xmlhttprequest request looked like:

xmlhttp.open('get', 'http://www.example.com/script.php?arg=val&sid=' + math.random(),true) ; 

where example.com same domain. not work now, changed to:

xmlhttp.open('get', 'script.php?arg=val&sid=' + math.random(),true) ; 

and works fine on major browsers, expected.

my question this: did same origin policy chrome , firefox change in past 4 years in such way make xmlhttprequest need fixing? remember used work, can't go in time test it, , can't see documentation online indicates change of same origin policy. apologies if off topic, want understand how change of behaviour happened. simple "yes, changed" or "no, never changed, , should never have worked in first place." do.

same origin must match domain exactly, protocol (e.g. http or https must match) , port (if specified). guess page either switched https or started using custom port?

for example, https://www.example.com/index.html, not ajax call http://www.example.com/script.php.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -