• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Testing for cookie disabled browser - netscape problem

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear gurus and colleagues,
I have a need to test whether cookies are enabled or not in the browser. Setting a cookie and then getting it did not work because the cookie seems to be visible only 'downstream' from the servlet. So looking through the ever so useful JavaRanch archives I found a solution.
It works for Internet Explorer but not for Netscape (no matter which version).
Any ideas?


 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's OK, but only if you've already created a session! The best way I know is to snoop out the browser's support in the site's home page so that when they go to log in, it all comes down and you can store it in the session. I do this not only for cookies, but detecting support for Java, JavaScript, etc.
 
Sanjay Anand
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please explain how I might do that?
Thanks in advance.
Sanjay
 
reply
    Bookmark Topic Watch Topic
  • New Topic