checking whether browser allows cookies in asp.net

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default checking whether browser allows cookies in asp.net

    Can you check whether a users browser allows you to use cookies?

    Cheers

    Ollie


    Ollie Guest

  2. Similar Questions and Discussions

    1. Browser Cookies in Mac
      Hello, Im developing an application in Actionscript3 in Flash for Windows, but recently I try to develop the same code in Flash for Mac and the...
    2. Simulating browser: how can I get server's cookies? (fsockopen)
      Hi all, I am developing a script that simulates a browser. So it makes http reqeusts via fsockopen. But I also need the cookies that are sent...
    3. cookies appearing in browser
      Hi! I have a php website that is showing cookies on screen instead of processing them. When I do a 'view source' I get the following: ---...
    4. checking whether user browser has cookies turned on?
      I am developing a web application that make use of the user browser's cookies mechanism. Specifically my application will try to retrieve a...
    5. Alternatives when user's browser doesn't accept cookies
      If you have per user information that you want to store in session and the setting in web.config is set to cookieless=false so you are intending on...
  3. #2

    Default Re: checking whether browser allows cookies in asp.net

    if Request.Browser.Cookies = True



    "Ollie" <ollie_riches@hotmail.com> wrote in message
    news:ecCfaEZcEHA.3824@TK2MSFTNGP10.phx.gbl...
    > Can you check whether a users browser allows you to use cookies?
    >
    > Cheers
    >
    > Ollie
    >
    >

    Jared Guest

  4. #3

    Default Re: checking whether browser allows cookies in asp.net

    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" <VB_Puzzled_VB@email.com> wrote in message
    news:10g502m2ea1h3b3@corp.supernews.com...
    > if Request.Browser.Cookies = True
    >
    >
    >
    > "Ollie" <ollie_riches@hotmail.com> wrote in message
    > news:ecCfaEZcEHA.3824@TK2MSFTNGP10.phx.gbl...
    > > 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 ([url]http://www.grisoft.com[/url]).
    Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/04


    WL Guest

  5. #4

    Default Re: checking whether browser allows cookies in asp.net

    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" <ollie_riches@hotmail.com> wrote in message
    news:ecCfaEZcEHA.3824@TK2MSFTNGP10.phx.gbl...
    > Can you check whether a users browser allows you to use cookies?
    >
    > Cheers
    >
    > Ollie
    >
    >

    Saber Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139