javascript - all relative URLs get converted into absolute -
this issue exists in chrome , firefox not ie.
i have angular app. once view loaded, xhr requests made relative paths converted requests absolute path.
example:
i navigate http://example.com/foo/#/bar
in chrome dev tools type:
var xhr = new xmlhttprequest(); xhr.open("get", "ping", true);//or "./ping" xhr.send();
the result 404 error , network tab shows request made http://example.com/ping
instead of http://example.com/foo/ping
.
what can possibly cause behavior?
turned out rogue <base href="/">
tag.
Comments
Post a Comment