• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cookies

 
Yogender Butola
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm setting cokkies through my servlet. But before doing that, I want to confirm whether cookies are enabled in the browser or not. If cookies are not enabled, I want to display a message in the borwser to enable the cookies first.

How can I check whethere cookies are enabled or disabled by the browser?
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can do that except by setting a cookie and seeing if it comes back with the next request. If it does then cookies are enabled, if it doesn't then they're probably not.

Jules
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the alternative is URL rewriting, however exposing the session id in the request can open up security issues.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic