473,498 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect if cookies are enabled

NWx
Hi,

How can I detect is cookies are enabled or not in client browser?

Thanks?

Nov 18 '05 #1
6 2702
if(!IsPostBack)
{
if(Request.Browser.Cookies)
{
objUserCookie = Request.Cookies["userInfo"];
"NWx" <te**@test.com> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
Hi,

How can I detect is cookies are enabled or not in client browser?

Thanks?

Nov 18 '05 #2
Dan
Request.Browser.Cookies determines if the browser supports cookies, not if
they're enabled.

Not sure of a neat way to check they're enabled - maybe try creating one,
and then retrieve its value.

Dan

"Slipperman" <Xs**@Xearthlink.net> wrote in message
news:Pw*****************@newsread1.news.atl.earthl ink.net...
if(!IsPostBack)
{
if(Request.Browser.Cookies)
{
objUserCookie = Request.Cookies["userInfo"];
"NWx" <te**@test.com> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
Hi,

How can I detect is cookies are enabled or not in client browser?

Thanks?


Nov 18 '05 #3
There is no way to verify that cookies are not disable other than
creating a cookie a retrieving it.

"Dan" <da*@dontspam.com> wrote in message news:<Om**************@TK2MSFTNGP11.phx.gbl>...
Request.Browser.Cookies determines if the browser supports cookies, not if
they're enabled.

Not sure of a neat way to check they're enabled - maybe try creating one,
and then retrieve its value.

Dan

"Slipperman" <Xs**@Xearthlink.net> wrote in message
news:Pw*****************@newsread1.news.atl.earthl ink.net...
if(!IsPostBack)
{
if(Request.Browser.Cookies)
{
objUserCookie = Request.Cookies["userInfo"];
"NWx" <te**@test.com> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
Hi,

How can I detect is cookies are enabled or not in client browser?

Thanks?


Nov 18 '05 #4
Also, please note that Session cookies may be enabled while Permanent
cookies may not.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"gh0st54" <gh*****@hotmail.com> wrote in message
news:7f**************************@posting.google.c om...
There is no way to verify that cookies are not disable other than
creating a cookie a retrieving it.

"Dan" <da*@dontspam.com> wrote in message

news:<Om**************@TK2MSFTNGP11.phx.gbl>...
Request.Browser.Cookies determines if the browser supports cookies, not if they're enabled.

Not sure of a neat way to check they're enabled - maybe try creating one, and then retrieve its value.

Dan

"Slipperman" <Xs**@Xearthlink.net> wrote in message
news:Pw*****************@newsread1.news.atl.earthl ink.net...
if(!IsPostBack)
{
if(Request.Browser.Cookies)
{
objUserCookie = Request.Cookies["userInfo"];
"NWx" <te**@test.com> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> How can I detect is cookies are enabled or not in client browser?
>
> Thanks?
>
>
>

Nov 18 '05 #5
What is the solution then? I am having the same delima

Thanks, Darshan
Nov 18 '05 #6
The way this is done on Microsoft Office Online is that we have a page which
tries to set a session cookie and a permanent cookie; this page then
redirects to a page which tests for those cookies. If they're not both
present, that page then redirects to a "you need to enable cookies" error
page.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Darshan Arney" <da*************@hotmail.com> wrote in message
news:D3**********************************@microsof t.com...
What is the solution then? I am having the same delima?

Thanks, Darshan

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
7839
by: Agoston Bejo | last post by:
Hi, I searched around everywhere on the net, but could not find a simple example of detecting if cookies are enabled - on server side, and without moving from one page to another. This should be...
0
1235
by: Sri. | last post by:
Hi I am trying to figure out how to test whether my browser cookies are enabled. I used the code from the following page...
0
1254
by: Sri | last post by:
Hi I am trying to figure out how to test whether my browser cookies are enabled. I used the code from the following page...
1
2821
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and...
2
1340
by: Tee | last post by:
Hi, How can we easily detect cookies is enabled? Thanks
1
2466
by: FishKeeper | last post by:
I'm trying to write JavaScript code to test whether cookies are enabled by writing a cookie and then reading its value. My code works fine in Firefox, but it's not working in Internet Explorer 6. ...
3
1953
by: Victor | last post by:
I was thinking about an easy to determine if cookies are set or not in ASP. I began thinking about how the Session ID is dependent upon a cookie - right? Well, I disabled cookies in Firefox and...
24
2391
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I see in javascript if a web browser accepts cookies?...
1
1953
stepterr
by: stepterr | last post by:
Hi All, Does anyone know if it is possible to detect if a user has SSL enabled in their browser? I have a login page that is https but if the user does not have SSL enabled it of course just gives...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.