Reputation: 798
What determines the value of document.domain property on page? It seems like it's not always equal to the root url domain.
Upvotes: 0
Views: 71
Reputation: 2997
document.domain
contains the complete domain (including subdomains) from which the page was downloaded. You can set it manually to a parent domain. E.g., you can set the domain of a document loaded from subdomain.example.com
to example.com
. <iframe>
s may have a different domain than the domain in the url bar.
Upvotes: 1