tags:

views:

22

answers:

2

I'm following Charles Miller's persistent login cookie best practice.

After I use the persistent cookie, I issue a new cookie (with the same name, but new token).

But before I issue the new one, do need to delete the old cookie?

If I do not, will the browser just replace the old cookie with the new cookie (since they have the same name)?

A: 

If the new cookie is with the same name it will simply overwrite the previous cookie value so you don't need to delete it.

Darin Dimitrov
A: 

If they have the same name, then yes, it will replace it, with the new one. So no need to unset it.

Squ36