user339160
user339160

Reputation:

How to remove Main Domain cookie from Sub Domain

is it possible to remove Main Domain cookie from Sub Domain ?I am using single sign on .On logout i want to remove the maindomain cookie

Upvotes: 6

Views: 2583

Answers (3)

Brett
Brett

Reputation: 6030

not ideal and not tested / validated, but you might be able to unset the cookie on the client (e.g. using javascript). Not the most elegant solution, but could potentially work.

Upvotes: 0

Spudley
Spudley

Reputation: 168853

As far as I know, you can't do that.

But couldn't you just point the logout call at the main domain? (presumably you're already doing this for the login call, in order to get the main domain cookie in the first place)

Upvotes: 2

Marc Gravell
Marc Gravell

Reputation: 1064184

I suspect you would have to navigate to the parent domain, have it remove the cookie, and then maybe redirect back to the child site (perhaps passing the return url encoded on the query-string).

Upvotes: 0

Related Questions