由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: 有没有办法在browser第一次访问的时候知道是不是支持cookie?
相关主题
有没有办法在browser第一次访问的时候知道是不是支持cookie?Who's online--JSP?
java servlet httpsession问题求教简单的EJB问题
JAVA新手问题请教Stateful session bean到底有啥好处?
One more servlet Q: Http Sessionproblem about a web access
jnlp 如何获得session有weblogic的大牛或者spring security的大牛来帮帮忙吗?
关于Jsp timeoutHow do I send cookies from a servlet?
Spring question, redirect and carry data over?How to redirect standard input in java
How can I void a cookie, and delete it from the browser?(FAQ)Question of POP&SMTP server connection
相关话题的讨论汇总
话题: session话题: user话题: cookie话题: request话题: returning
进入Java版参与讨论
1 (共1页)
o***e
发帖数: 30
1
nope.
but you can do a redirect for a new session,
see if the 2nd request carries the cookie,
then do another redirect to the original request.
d********r
发帖数: 199
2
多谢指教。
我也想到过这样做,不过觉得挺笨的。
有没有更好的解决方法呢?

有没有办法在browser第一次访问我的servlet的时候就知道该Browser是不是支持cookie?
而如果Browser支持cookie的话,上述";jsessionid=956BDE2350B3D6804965F328A3FBB63E
就会在第一次的页面输出中把所有的LINK都encode()上,就是带有:";jsessionid=956BD

【在 o***e 的大作中提到】
: nope.
: but you can do a redirect for a new session,
: see if the 2nd request carries the cookie,
: then do another redirect to the original request.

o***e
发帖数: 30
3
no, that's the way it is.

【在 d********r 的大作中提到】
: 多谢指教。
: 我也想到过这样做,不过觉得挺笨的。
: 有没有更好的解决方法呢?
:
: 有没有办法在browser第一次访问我的servlet的时候就知道该Browser是不是支持cookie?
: 而如果Browser支持cookie的话,上述";jsessionid=956BDE2350B3D6804965F328A3FBB63E
: 就会在第一次的页面输出中把所有的LINK都encode()上,就是带有:";jsessionid=956BD

m******t
发帖数: 2416
4

But what's the point to start a new session on the *very first*
request? At this point the user has not done anything that needs
to be treated individually.
If you need to deal with a returning user from previous sessions,
then his browser must have cookie support, otherwise there is
no way for you to identify him as a returning user to begin with.

【在 d********r 的大作中提到】
: 多谢指教。
: 我也想到过这样做,不过觉得挺笨的。
: 有没有更好的解决方法呢?
:
: 有没有办法在browser第一次访问我的servlet的时候就知道该Browser是不是支持cookie?
: 而如果Browser支持cookie的话,上述";jsessionid=956BDE2350B3D6804965F328A3FBB63E
: 就会在第一次的页面输出中把所有的LINK都encode()上,就是带有:";jsessionid=956BD

c**g
发帖数: 274
5

if user bookmarked the url with sessionid, then he can identify him
as a returning user before the session expired.

【在 m******t 的大作中提到】
:
: But what's the point to start a new session on the *very first*
: request? At this point the user has not done anything that needs
: to be treated individually.
: If you need to deal with a returning user from previous sessions,
: then his browser must have cookie support, otherwise there is
: no way for you to identify him as a returning user to begin with.

o***e
发帖数: 30
6
some companies are obsessed with tracking usage pattern.

【在 m******t 的大作中提到】
:
: But what's the point to start a new session on the *very first*
: request? At this point the user has not done anything that needs
: to be treated individually.
: If you need to deal with a returning user from previous sessions,
: then his browser must have cookie support, otherwise there is
: no way for you to identify him as a returning user to begin with.

m******t
发帖数: 2416
7

That's different. Before your session expires, your request is a
*returning* request, not the first one, regardless you came back with
a bookmark or not.
If an app wishes to recognize a returning user with a session id
that has already expired, then it would have to at least persist
this session id somewhere and *keep it forever* because it never
knows when the user is going to come back with that id.

【在 c**g 的大作中提到】
:
: if user bookmarked the url with sessionid, then he can identify him
: as a returning user before the session expired.

1 (共1页)
进入Java版参与讨论
相关主题
Question of POP&SMTP server connectionjnlp 如何获得session
Build web server and dispatcher?关于Jsp timeout
is there anyway that i can return...Spring question, redirect and carry data over?
新手问一个:如何找.jar文件里都有什么class?How can I void a cookie, and delete it from the browser?(FAQ)
有没有办法在browser第一次访问的时候知道是不是支持cookie?Who's online--JSP?
java servlet httpsession问题求教简单的EJB问题
JAVA新手问题请教Stateful session bean到底有啥好处?
One more servlet Q: Http Sessionproblem about a web access
相关话题的讨论汇总
话题: session话题: user话题: cookie话题: request话题: returning