This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Check Cookies enabled via JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Check Cookies enabled via JavaScript" Watch "Check Cookies enabled via JavaScript" New topic
Author

Check Cookies enabled via JavaScript

Carpe Diem
Greenhorn

Joined: Sep 24, 2004
Posts: 2
Hi,
I'm developing web pages for the browser netscape 4.78.
Now I try to check in my page whether the netscape browser showing the pages has c ookies enabled.
In netscape version 5 and 6 it works in JavaScript via navigator.c ookieEnabled. Is there an equivalent function for netscape version 4.78?

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I think the easiest way of testiung crossbrowser wise is:



Eric
Carpe Diem
Greenhorn

Joined: Sep 24, 2004
Posts: 2
Thanks Eric,

it works that way.
Just one remark. To compare by equality that test is stored in the cookie failed because additionaly the jsessionid was also stored in the cookie. Bur checking for test as substring of the cookie contents was successfully.

Thanks again and bye
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You cpould just test to see if the length of the cookie is greater then 0 too.
 
wood burning stoves
 
subject: Check Cookies enabled via JavaScript
 
Similar Threads
How to find out jre version of a client browser using javascript
With Java Plug-in, document.applets.length returns 0
How to call applet methods from JavaScript, when using Java Plug-in in Netscape 4.78?
Is javascript enabled?
Checking browser version & JavaScript enabled