http://qs321.pair.com?node_id=154926


in reply to How can you tell if cookies are disabled?

I don't know of another way than setting the cookie and then reading it again to check if it's present.

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste

  • Comment on Re: How can you tell if cookies are disabled?

Replies are listed 'Best First'.
Re: Re: How can you tell if cookies are disabled?
by vagnerr (Prior) on Mar 28, 2002 at 12:07 UTC
    projekt21 is right. The client server relationship between the web browser and the server consists of the browser contacting the server and requesting a page. The request for the page will include any relevent cookies (ie ones that match the domain). So you need to set a cookie in your response and then if you dont recieve the cookie next time the browser makes a request assume that cookies are disabled
    You may be able to get some javascript to detect the state of cookies and then adjust any furtehr requests to say "I dont do cookies" (a cookies=no parameter in a hidden form) but it will still be a two stage process of you sending a page with the javascript in first and waiting for the next page that the browser requests.

    ---If it doesn't fit use a bigger hammer