To detect if browser accept 3th.part cookies

Discussion in 'Javascript' started by Steel, Dec 7, 2009.

  1. Steel

    Steel Guest

    Hi at all

    I need to detect if cookies are enabled into user browser

    To do that I use this function:

    function cooks()

    {

    var cookieEnabled=(navigator.cookieEnabled)? true : false

    //if not IE4+ nor NS6+

    if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){

    document.cookie="testcookie"

    cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false

    }

    return cookieEnabled;

    }

    Unfortunately it detect only if are enabled cookies of current web site but
    not 3th.parts cookies (other site cookies).

    How can I do to detect if are enabled 3th.part cookies?

    Thank in advance
    Steel, Dec 7, 2009
    #1
    1. Advertising

  2. Steel wrote:

    > I need to detect if cookies are enabled into user browser
    >
    > To do that I use this function:


    Dump it; it is outdated. Cookie handling has become much more sophisticated
    since these properties were introduced, which has rendered them useless.

    Set the cookie and read it back; if successful, cookies of that type are
    "enabled".

    > How can I do to detect if are enabled 3th.part cookies?


    The same way.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
    Thomas 'PointedEars' Lahn, Dec 7, 2009
    #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. Robert V. Hanson
    Replies:
    2
    Views:
    666
    Yan-Hong Huang[MSFT]
    Jul 3, 2003
  2. rk325
    Replies:
    2
    Views:
    462
    rk325
    Apr 28, 2005
  3. =?Utf-8?B?ZG90bmV0dGVzdGVy?=

    Detect if cookies/javascript are disabled on client browser

    =?Utf-8?B?ZG90bmV0dGVzdGVy?=, Jan 16, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    687
    =?Utf-8?B?ZG90bmV0dGVzdGVy?=
    Jan 16, 2006
  4. _Who
    Replies:
    7
    Views:
    2,657
  5. Michel
    Replies:
    1
    Views:
    79
    Thomas 'PointedEars' Lahn
    Oct 23, 2003
Loading...

Share This Page