ar099968
ar099968

Reputation: 7537

Javascript: Communication beetween browser tab on same top domain

I have two website, eg.:

I want send some message between those site if there are opened in different tabs.

There are different possible ways:

But each one require same origin or access to window.opener...

There are a solution browser side for communicate between tabs if the top domain is the same?

Upvotes: 0

Views: 241

Answers (1)

brandt.codes
brandt.codes

Reputation: 923

No, there is no way to do this only in the frontend. You need a server (backend) where booth tabs talks with. So tab 1 can send something to the server and tab 2 get it from the server. Everything else would be a big security issue!

Upvotes: 1

Related Questions