javascript – Enable WordPress website to share cookie with non-WordPress subdomain website

Question

If I set the WordPress cookie domain for the domain and all subdomains with:
define( ‘COOKIE_DOMAIN’, ‘.example.org’ ); in wp-config, the cookie is shared with subdomains that are hosted in the WordPress website.

How do I share the cookie with a subdomain that is a javascript website, not a WordPress website?

in progress 0
clevernickname 2 months 2021-07-28T09:18:30-05:00 0 Answer 0 views 0

Answer ( 1 )

    0
    2021-08-01T07:53:53-05:00

    define( 'COOKIE_DOMAIN', '.example.org' ); will share the cookie with all *.example.org websites, whether they’re running WordPress or not. Or maybe restricted to https:// sites only, but apart from that any website will see the cookie. It’s your browser that’s sending the cookie and it doesn’t know what the website is running.

Leave an answer

Browse
Browse