-3

My question is very simple, it may be asked before but the answers are not useful for me so i am asking it again.

How can i persist my cookie stored at browser , after is cleared manually ?

Scenario

I want to keep track of customer visit , so what i have been trying is at the very first request to my server i checked for any previous cookie stored , if it is found then i simply read the value and find relative information , if it is not found then i am creating a cookie and it to the response and so on.

Now, if Clients uses mozilla firefox browser and if client manually deletes all cookies ,the information is lost and according to above case every time the new cookie is generated which is meaning less.

I just test the same thing for SO , and i come to know that even if i delete all the history of browser (By pressing Ctrl + Shift + Del for Mozilla firefox v 20.0.1) , the SO can remember me.

So what technique SO is using for storing client information OR in the other words what should i do to persist my information at client side for most of the cases ?

During Google i found

Stack overflow Question

Java script cookie library

but still they have insufficient answers.

I also know that if someone re install OS then it is obvious that the information are lost and it is acceptable condition.

my goal is to preserve cookie information even if someone deletes it manually ?

Thanks

4

1 回答 1

3

You can't. And if you could it would be a very buggy browser.

What you can do is use flash, it has a different cookie space than the one of the browser, so usually by clearing the cookies in the browser the ones in flash are left untouched.

于 2013-05-19T09:45:29.597 回答