Document.domain or

I need to get the domain of the page (
There seems to be 2 variables to get this info.
document.domain & - Both are set in FF & IE.
So whats the difference between these ? contains host part of the address. document.domain contains domain the current document belongs to. The document.domain can be changed to correct the domain:

You can read here on why changing document.domain is useful: