how does ff resolve relative hrefs correctly?
for a long time i am curious about one thing that how browsers
correctly resolve wrongly given relative hrefs.
here is my example:
suppose we are at url "www.aaa.com/bbb/ccc" and what we see somewhere
in the source html is something like that :
and in our browser (whatever it is) we see the actual link as
however in a different domain when we are at url "www.xxx.com/yyy/zzz"
and have an element
this time our browser resolves this link as "www.xxx.com/yyy/ttt/qqq"
surprising part here is that both of them are correctly resolved but
browser behaved differently!
by the way same example applies when relative urls starts with "/"...
do you have any idea how this is possible? do you know in which part
of the source code this operation is handled?
Re: how does ff resolve relative hrefs correctly?
Can you provide URLs where you've observed this? It's easier to
understand and therefore answer your question if we can look at the
exact same thing as what you are looking at.