浏览器Cookie持久性 [英] Browser Cookie Persistent

查看:187
本文介绍了浏览器Cookie持久性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单,以前可能会问,但答案对我没有用,所以我再问一次。

如何在浏览器中存储我的Cookie?手动清除后

我想跟踪客户访问,所以我一直在尝试是在我的服务器的第一个请求,检查任何以前的cookie存储,如果找到,然后我只是读取的值,并找到相对信息

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.

现在,如果客户端使用mozilla firefox浏览器,如果客户端手动删除所有的cookie,信息丢失,根据上述情况每次新的cookie生成的意思较少。

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.

我只是测试同样的东西为SO,我来要知道即使我删除浏览器的所有历史记录(通过按Ctrl + Shift + Del Mozilla firefox v 20.0.1),SO可以记住我。

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用于存储客户端信息,或者换句话说,我应该怎么做以在大多数情况下在客户端保持我的信息?

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 ?

在Google i发现

During Google i found

堆栈溢出问题

Java script cookie library

但仍然没有足够的答案。

but still they have insufficient answers.

我也知道,如果有人重新安装操作系统,那么很明显,信息丢失
,它是可以接受的条件。


我的目标是保留cookie信息,即使有人手动删除它

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


推荐答案

你不能。

你可以做的是使用flash,它有一个不同的cookie空间比浏览器的一个,所以通常情况下,通过清除浏览器中的cookie,闪存中的cookie保持不变。

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.

这篇关于浏览器Cookie持久性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆