This is part of the Netscape security model that allows unsigned scripts to communicate with one another as long as they belong to the same domain.
Normally, documents may not always be able to communicate with one another because they come from different servers. This can be alleviated by specifying a domain that is shared by several servers.
The initial value of this property is the complete host name of the server that provided the document when it was loaded.
A script is able to set a domain value that is a suffix of the existing domain. So, aaa.bbb.ccc.com can become bbb.ccc.com but cannot become another.domain.com which allows you to serve documents from several hosts in the same domain but not access content served by other domains.
Once any two documents have the same domain setting, they can exchange property values with one another even though they may have originated on different hosts.
See also: | Document object, JellyScript, Security policy |
Prev | Home | Next |
Document.documentElement | Up | Document.elementFromPoint() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |