Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > checking whether browser allows cookies in asp.net

Reply
Thread Tools

checking whether browser allows cookies in asp.net

 
 
Ollie
Guest
Posts: n/a
 
      07-24-2004
Can you check whether a users browser allows you to use cookies?

Cheers

Ollie


 
Reply With Quote
 
 
 
 
Jared
Guest
Posts: n/a
 
      07-24-2004
if Request.Browser.Cookies = True



"Ollie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can you check whether a users browser allows you to use cookies?
>
> Cheers
>
> Ollie
>
>



 
Reply With Quote
 
 
 
 
WL
Guest
Posts: n/a
 
      07-24-2004
I assumt his test (just like when testing whether JavaScript is supported)
only checks whether the browser used SUPPORTS cookies (although they might
have been disabled by the user) ?

If so: the only real way of testing is by a multistep process sending a
cookie and then trying to read it back.

Wim


"Jared" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> if Request.Browser.Cookies = True
>
>
>
> "Ollie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Can you check whether a users browser allows you to use cookies?
> >
> > Cheers
> >
> > Ollie
> >
> >

>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/04


 
Reply With Quote
 
Saber
Guest
Posts: n/a
 
      07-24-2004
Sub Page_Load()
If Not Page.IsPostBack Then
If Request.QueryString("AcceptsCookies") Is Nothing Then
Response.Cookies("TestCookie").Value = "ok"
Response.Cookies("TestCookie").Expires = _
DateTime.Now.AddMinutes(1)
Response.Redirect("TestForCookies.aspx?redirect=" & _
Server.UrlEncode(Request.Url.ToString))
Else
labelAcceptsCookies.Text = "Accept cookies = " & _
Request.QueryString("AcceptsCookies")
End If
End If
End Sub


SOURCE: MSDN
Microsoft Corporation. All rights reserved.


"Ollie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can you check whether a users browser allows you to use cookies?
>
> Cheers
>
> Ollie
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Give Request.Cookies and Response.Cookies is there any reason to use another method to use cookies? _Who ASP .Net 7 09-18-2008 07:49 PM
Detecting if the client browser disabled/allows java applets ? Wladimir Borsov HTML 0 11-01-2004 07:30 PM
Checking Whether a Browser Accepts Cookies rsindall@zethics.com ASP .Net 1 10-08-2004 07:15 AM
checking whether browser allows cookies in asp.net Ollie ASP .Net Security 2 07-24-2004 09:33 PM
checking whether user browser has cookies turned on? Kenjis Kaan Perl Misc 4 09-03-2003 05:52 AM



Advertisments