1. A method for sending data from a first to a second document loaded by a user agent implemented on a client device having one or more computer processors, the method comprising: utilizing the one or more computer processors in the client device to: transmit first and second download requests for the first and second documents, respectively, the first and second download requests identifying different domains as respective origins from which the first and second documents are to be loaded; execute a script in said first document which has been loaded by the user agent in response to the first download request, said script providing data to be sent to said second document; retrieve, from information collected by the user agent when the first document was loaded in response to the first download request, identification information uniquely identifying said first document and said origin of said first document; and send a message including said data and said identification information to said second document which has been loaded by the user agent in response to the second download request, wherein said script in said first document invokes a method implemented in said user agent, said method being defined to receive the data to be exchanged, receive information identifying said second document, extract information identifying said origin of said first document, and pass said data to be exchanged and said extracted information identifying said origin of said first document to said second document, and wherein said first and second documents and the structure of said first and second documents are addressed according to application programming interfaces (APIs) defined in a Document Object Model (DOM) module that is part of said user agent, and said method further comprises: instantiating, upon loading said first and said second document, two objects representing said first and second documents.
1. A method for sending data from a first to a second document loaded by a user agent implemented on a client device having one or more computer processors, the method comprising: utilizing the one or more computer processors in the client device to: transmit first and second download requests for the first and second documents, respectively, the first and second download requests identifying different domains as respective origins from which the first and second documents are to be loaded; execute a script in said first document which has been loaded by the user agent in response to the first download request, said script providing data to be sent to said second document; retrieve, from information collected by the user agent when the first document was loaded in response to the first download request, identification information uniquely identifying said first document and said origin of said first document; and send a message including said data and said identification information to said second document which has been loaded by the user agent in response to the second download request, wherein said script in said first document invokes a method implemented in said user agent, said method being defined to receive the data to be exchanged, receive information identifying said second document, extract information identifying said origin of said first document, and pass said data to be exchanged and said extracted information identifying said origin of said first document to said second document, and wherein said first and second documents and the structure of said first and second documents are addressed according to application programming interfaces (APIs) defined in a Document Object Model (DOM) module that is part of said user agent, and said method further comprises: instantiating, upon loading said first and said second document, two objects representing said first and second documents. 3. The method according to claim 1 , wherein said identification information includes information representing the domain from which said first document has been retrieved.