Determining if cookies are enabled or not

  • Thread starter Thread starter Ben Amada
  • Start date Start date
B

Ben Amada

I know to determine if cookies are enabled or not, you have to try to
create a cookie then try to read it back. I know one method is to redirect
the user to a 2nd page which creates the cookie, then the 2nd page redirects
the user back to the 1st page which tries to read the cookie.

The other method I thought of and am wondering if this is reliable or not,
is to create a cookie when IsPostBack = False, then have the user click a
Submit button which on postback (to the same page) tries to read the cookie.
Is this method as reliable as the first method I mentioned above?

Thanks in advance,
Ben
 
yes, but you won't know cookies are enabled until postback, that why most
sites use a sniffer page (that also checks for required plugins and
javascript support).

-- bruce (sqlwork.com)
 
bruce said:
yes, but you won't know cookies are enabled until postback, that why most
sites use a sniffer page (that also checks for required plugins and
javascript support).

-- bruce (sqlwork.com)

Hi,

A sniffer page would be useful, but in this particular case, I don't mind
waiting until postback to determine if cookies are enabled or not. Thanks
for the information :)

Ben
 
Back
Top