Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: How can you tell if cookies are disabled?

by projekt21 (Friar)
on Mar 28, 2002 at 11:45 UTC ( #154926=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://154926]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-04-16 00:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found