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