A
A
Arthur2017-08-21 17:56:38
JavaScript
Arthur, 2017-08-21 17:56:38

How to pass a variable to another domain using js?

There are two sites with vanilla JS
Site1 links to Site2.
it is necessary to transfer the referrer from Site1 to Site2 (that is, the one from where the user got to Site1)
cookies work within the same domain;
you cannot conditionally add parameters to location.href;
the option of loading site1 in an iframe on site2 with cookie check certainly works, but it's too cumbersome to load.
How else can you pass a value?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GrimJack, 2017-08-21
@GrimJack

Not sure, but maybe localstorage?

V
Vasily Nazarov, 2017-08-21
@vnaz

Make a common api.domain.tld, take CORS-Ajax with withCredentials from anywhere, session as standard, in cookies?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question