Cross-domain communication
First Claim
Patent Images
1. A non-transitory computer-readable medium embodying a program executable in a computing device, the program comprising:
- code that determines that a message is to be sent from code executing in a first network page frame to code executing in a second network page frame, wherein the first network page frame is from a first network site, the second network page frame is from a second network site, and the first network page frame and the second network page frame are configured to be rendered together as a network page;
code that determines whether a first domain of the first network site differs from a second domain of the second network site in response to determining that the message is to be sent from the code executing in the first network page frame to the code executing in the second network page frame;
code that sends the message to the code executing in the second network page frame by modifying a document object model (DOM) of the second network page frame to include the message when the first domain is determined not to differ from the second domain; and
code that, when the first domain is determined to differ from the second domain;
dynamically generates a plurality of messenger frames in the second domain;
encodes the message using a uniform resource locator (URL) compliant encoding;
sends the message from the code executing in first network page frame to the code executing in second network page frame by splitting the message into a plurality of message segments based at least in part on a length of the message and embedding individual ones of the plurality of message segments in a query string portion of an address of a corresponding one of the plurality of messenger frames;
wherein individual ones of the plurality of messenger frames corresponds to a respective iframe element in another DOM of the first network page frame; and
wherein the code executing in the first network page frame and the code executing in the second network page frame are restricted from direct communication when the first domain is determined to differ from the second domain.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed are various embodiments for performing cross-domain communication using messenger frames. One or more messenger frames are dynamically generated in response to determining that a message is to be sent from a first frame in one domain to a second frame in another domain in a client. The message is sent from the first frame to the second frame by embedding the message in addresses of the messenger frames. Code executing in the first frame and code executing in the second frame are restricted from direct communication in the client.
36 Citations
27 Claims
-
1. A non-transitory computer-readable medium embodying a program executable in a computing device, the program comprising:
-
code that determines that a message is to be sent from code executing in a first network page frame to code executing in a second network page frame, wherein the first network page frame is from a first network site, the second network page frame is from a second network site, and the first network page frame and the second network page frame are configured to be rendered together as a network page; code that determines whether a first domain of the first network site differs from a second domain of the second network site in response to determining that the message is to be sent from the code executing in the first network page frame to the code executing in the second network page frame; code that sends the message to the code executing in the second network page frame by modifying a document object model (DOM) of the second network page frame to include the message when the first domain is determined not to differ from the second domain; and code that, when the first domain is determined to differ from the second domain; dynamically generates a plurality of messenger frames in the second domain; encodes the message using a uniform resource locator (URL) compliant encoding; sends the message from the code executing in first network page frame to the code executing in second network page frame by splitting the message into a plurality of message segments based at least in part on a length of the message and embedding individual ones of the plurality of message segments in a query string portion of an address of a corresponding one of the plurality of messenger frames; wherein individual ones of the plurality of messenger frames corresponds to a respective iframe element in another DOM of the first network page frame; and wherein the code executing in the first network page frame and the code executing in the second network page frame are restricted from direct communication when the first domain is determined to differ from the second domain.
-
-
2. A method, comprising:
-
determining, via one or more client computing devices, that a message is to be sent from code executing in a first network page frame to code executing in a second network page frame, wherein the first network page frame is from a first network site, the second network page frame is from a second network site, and the first network page frame and the second network page frame are configured to be rendered together as a network page; determining, via at least one of the one or more client computing devices, whether a first domain of the first network site differs from a second domain of the second network site in response to determining that the message is to be sent from the code executing in the first network page frame to the code executing in the second network page frame; sending the message to the second network page frame by modifying a document object model (DOM) of the second network page frame to include the message when the first domain is determined not to differ from the second domain; and when the first domain is determined to differ from the second domain; dynamically generating, via at least one of the one or more client computing devices, at least one messenger frame in the second domain; encoding, via at least one of the one or more client computing devices, the message using a uniform resource locator (URL) compliant encoding; sending, via at least one of the one or more client computing devices, the message from the code executing in first network page frame to the code executing in second network page frame by embedding the message in an address of the at least one messenger frame; and wherein the code executing in the first network page frame and the code executing in the second network page frame are restricted from direct communication in the one or more client computing devices when the first domain is determined to differ from the second domain. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A system, comprising:
-
at least one computing device; and a network page generation application executable in the at least one computing device, the network page generation application comprising; logic that receives a request for a network page frame from a client; logic that sends the network page frame and code that updates the network page frame to the client, wherein the code that updates the network page frame includes; code that determines whether a first domain of the network page frame differs from a second domain of another network page frame in response to determining that a message is to be sent from the network page frame to the another network page frame, wherein the network page frame and the another network page frame are configured to be rendered together as a network page; code that modifies a document object model (DOM) of the another network page to include the message to be sent from the network page frame to the another network page frame when the first domain is determined not to differ from the second domain; and code that, when the first domain is determined to differ from the second domain; generates a plurality of messenger frames in the second domain; divides the message into a plurality of message segments based at least in part on a maximum length of an address field; encodes the message using a uniform resource locator (URL) compliant encoding before dividing the message into the plurality of message segments; and sends individual ones of the plurality of message segments to the another network page frame in the second domain using a corresponding messenger frame from the plurality of messenger frames, wherein the address field of the corresponding messenger frame is set to include one of the plurality of message segments; and wherein the code that updates the network page frame is restricted from direct communication with the another network page frame when the first domain of the network page frame is determined to differ from the second domain of the another network page frame. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
-
20. A system, comprising:
-
at least one computing device; and a network page generation application executable in the at least one computing device, the network page generation application comprising; logic that receives a request for a network page frame from a client; logic that sends the network page frame and code that updates the network page frame to the client, wherein the code that updates the network page frame includes; code that determines whether a first domain of the network page frame differs from a second domain in another network page frame in response to determining that a message is to be sent from the network page frame to the another network page frame, wherein the network page frame and the another network page frame are configured to be rendered together as a network page; code that modifies a document object model (DOM) of the another network page to include the message to be sent from the network page frame to the another network page frame when the first domain is determined not to differ from the second domain; and code that, when the first domain is determined to differ from the second domain; generates at least one messenger frame in the second domain; generates an encoded message by encoding the message using a uniform resource locator (URL) compliant encoding; and sends the encoded message to the another network page frame in the second domain using the at least one messenger frame, wherein the encoded message is embedded in an address field of the at least one messenger frame; and wherein the code that updates the network page frame is restricted from direct communication with the another network page frame when the first domain of the network page frame is determined to differ from the second domain of the another network page frame. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27)
-
Specification