Re: How to detect blocked cookies

Discussion in 'ASP .Net' started by Richard K Bethell, Nov 24, 2003.

  1. "Chuck Traywick" <> wrote in message
    news:00e601c3b2bd$5691baa0$...
    > In an asp.net app on your page load event how to you
    > detect if COOKIES are blocked on the client machine?
    >
    > Not talking about detected browser capabilites as in
    > Dim mCook As Boolean
    > mCook = Request.Browser.Cookies
    >
    > I think this just tells you that the browser (MS or NS)
    > allows cookies, not whether this client has cookies
    > blocked?


    All web programming, even aspx programming, is essentially just Request and
    Response dressed up as events. And web browsers, as the Response clients, do
    not identify what parts of the response information they are interested in,
    and what they discard - all the cookie information there is is passed in the
    HTTP_COOKIE http header, whether there are settings blocking some cookies,
    all cookies, or no cookies. As such there is no "browser setting" about
    blocked cookies there to be detected.

    Consequently, it is necessary to test for the existence of the cookies you
    are attempting to create on a next aspx page. If the next page returns a
    null for the queried cookies, then it can be fairly surmised that those
    cookies have been blocked. There is no shorter way that I know of.

    R.
     
    Richard K Bethell, Nov 24, 2003
    #1
    1. Advertising

  2. Richard K Bethell

    Guest Guest

    Thanks Richard. Been playing with that.

    It also seems, based upon settings that even if you have
    COOKIES BLOCKED, some get created anyway, or I should
    says get passed from one page to the next as a "session"
    cookie.

    So, that's good advice about writing one calling another
    page etc.

    Just discovered that when you do this it appears you need
    to destroy the test cookie from memory since it gets
    passed to the next page and will be "found".

    Ah, the joys of development :)

    Thanks again.
    >-----Original Message-----
    >"Chuck Traywick"

    <> wrote in
    message
    >news:00e601c3b2bd$5691baa0$...
    >> In an asp.net app on your page load event how to you
    >> detect if COOKIES are blocked on the client machine?
    >>
    >> Not talking about detected browser capabilites as in
    >> Dim mCook As Boolean
    >> mCook = Request.Browser.Cookies
    >>
    >> I think this just tells you that the browser (MS or NS)
    >> allows cookies, not whether this client has cookies
    >> blocked?

    >
    >All web programming, even aspx programming, is

    essentially just Request and
    >Response dressed up as events. And web browsers, as the

    Response clients, do
    >not identify what parts of the response information they

    are interested in,
    >and what they discard - all the cookie information there

    is is passed in the
    >HTTP_COOKIE http header, whether there are settings

    blocking some cookies,
    >all cookies, or no cookies. As such there is no "browser

    setting" about
    >blocked cookies there to be detected.
    >
    >Consequently, it is necessary to test for the existence

    of the cookies you
    >are attempting to create on a next aspx page. If the

    next page returns a
    >null for the queried cookies, then it can be fairly

    surmised that those
    >cookies have been blocked. There is no shorter way that

    I know of.
    >
    >R.
    >
    >
    >.
    >
     
    Guest, Nov 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Colonel
    Replies:
    1
    Views:
    430
    The Colonel
    Nov 8, 2006
  2. Khafancoder

    Third-Part Cookies blocked by IE

    Khafancoder, Feb 2, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    3,204
    George Ter-Saakov
    Mar 27, 2007
  3. =?Utf-8?B?SmFtZXM=?=

    Blocked cookies

    =?Utf-8?B?SmFtZXM=?=, Jul 6, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    441
    George Ter-Saakov
    Jul 6, 2007
  4. _Who
    Replies:
    7
    Views:
    2,683
  5. What-a-Tool

    Auto formsubmit with blocked cookies problem?

    What-a-Tool, Mar 31, 2005, in forum: Javascript
    Replies:
    0
    Views:
    89
    What-a-Tool
    Mar 31, 2005
Loading...

Share This Page