samyk / evercookie

Produces persistent, respawning "super" cookies in a browser, abusing over a dozen techniques. Its goal is to identify users after they've removed standard cookies and other privacy data such as Flash cookies (LSOs), HTML5 storage, SilverLight storage, and others.
https://samy.pl/evercookie/
4.43k stars 662 forks source link

How can I set evercookie with expire time ? #84

Open easyopen opened 9 years ago

easyopen commented 9 years ago

Anybody know ?

samyk commented 9 years ago

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! :)

chriscct7 commented 9 years ago

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 9 years ago

Sure, if someone wants to implement this