0

I created a Google site page with 5 links on it. Is it possible to create on my site a script or something that stores in a cookie the link on which the user has clicked, and then the next time he will connect to the page, he will be automatically redirected to the link he clicked on ? For information, the user connect to the site with his Google email account.

How can I do that please?

Thank you very much in advance for your help

1 Answers1

0

While it is possible to read cookies and redirect using JavaScript inside a Google Page (using widgets), browsers will not allow you to set cookies for a completely different domain for obvious security reasons.

Related:

You could theoretically try and send an AJAX request from the Google Page with a "where should I direct this user to?" and expect a URL or a null.

See:

But overall, your task is not as straightforward as it may seem. The browser will, fortunately, not play along.

Community
  • 1
  • 1
soulseekah
  • 7,890
  • 3
  • 47
  • 54