I want to know how "location"(window.location) object is compared in javascript i.e. which values are taken into consideration while comparing two "location" objects.
Suppose i have top.location = "http://www.abc.com" and self.location = "http://www.abc.com". If i compare them as (top.location == self.location), it gives false. Whereas, if i compare them as (top.location.href == self.location.href), it will gives true.
Can anyone explain why this happens?
Thanks in advance.