Live preview with Hash

Hash sent:

Explanation

In this POC, we used the channel ID to segregate all the socket connections to ensure the connection remains private. Unlike the previous POC, if you duplicate this tab and send the message, the message will not be visible to the other tabs.

We are generating this hash on every session to ensure that the hash remains unique. In this example, we set the hash directly to the iframe's window object.

We can perform this action as the same origin hosts both the parent and the iframes. The browser throws an error when we try to use this method on Windows with a different origin, as demonstrated in the following POC.