-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

7
  • 1
    I don't know who idiot down voted my genuine question ? Commented May 19, 2013 at 9:47
  • 1
    You mention the SO remembers the cookie information even when you delete the cookies from browser, did you selected to delete everything? After deleting everything, do you need to login again to SO? Commented May 19, 2013 at 9:53
  • I delete everything including Cookie , and when i restart browser after shutting down all the windows , i do not need to login , SO can still remember me . I think SO is using local shared object [Flash Caching] while persisting cleint information.did you down vote my question ? Commented May 19, 2013 at 9:58
  • Once you clear everything there is no way that SO (or any website) will remember cookies, there seems to be some software or Firefox plugin installed which is causing this. If you still want to verify, try it on different browser or entirely different machine Commented May 19, 2013 at 10:19
  • 1
    @Mihir, I didn't downvote your question but when you start it with "this question has been asked before but I didn't like the answers so I'm asking it again", I'm not surprised. Unless there is something genuinely new in your question, you probably should have just offered a bounty on one of the others. Commented May 19, 2013 at 10:35

1 Answer 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.

Sign up to request clarification or add additional context in comments.

3 Comments

then what technique so does use ? is it Flash ? HTML 5 ?
This! Cookies belong to the user, not some site. The site is allowed to create them at the behest of the user and they're not some god-given right. If they don't want to store your cookies, leave them alone. This is akin to asking "how can I force my program to be pinned to the start menu?" or "How can I ensure my program runs, even against the wishes of the person who owns the computer?"
I research and found out that SO uses HTML 5 storage , though some guy from SO give me an hint.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.