samyk/evercookie

How can I set evercookie with expire time ?

Opened this issue · 3 comments

Anybody know ?

Currently there's no support for expirations. Some methods of storage don't support an expiration, but you could build an expiration into your backend which would be the proper way to handle it, as well as serializing the expiration on the client side so that evercookie code can expire it if it detects the data.

I welcome additions like this! :)

Couldn't you just make a method to delete the cookie, then by default make evercookie store a data (the expiration date) if its passed into the evercookie create method, and then when you call the get evercookie method it would delete the cookie if its expired? Sort of like WordPress's transient API

samyk commented

Sure, if someone wants to implement this