How to set a cookie for another domain

后端 未结 11 1782
一向
一向 2020-11-22 07:21

Say I have a website called a.com, and when a specific page of this site is loaded, say page link, I like to set a cookie for another site called b.com

11条回答
  •  既然无缘
    2020-11-22 07:49

    Setting cookies for another domain is not possible.

    If you want to pass data to another domain, you can encode this into the url.

    a.com  ->  b.com/redirect?info=some+info (and set cookie) -> b.com/other+page
    

提交回复
热议问题