Freelancer: aneeshtclt
Compartir:
Reportar entrada

Modified code

I have added 'thirdEnable' variable in the script. sample code : window._3rd_party_test_step1_loaded = function(){ // At this point, a third-party domain has now attempted to set a cookie (if all went to plan!) var step2Url = 'http://aneesht.in/step2.js.php', resultsEl = document.getElementById('3rd_party_cookie_test_results'), step2El = document.createElement('script'); // And load the second part of the test (reading the cookie) step2El.setAttribute('src', step2Url); resultsEl.appendChild(step2El); } window._3rd_party_test_step2_loaded = function(cookieSuccess){ if(cookieSuccess){ //Third party cookies are functioning in your browser thirdEnable = 'true'; } else{ //Third party cookies appear to be disabled thirdEnable = 'false'; } if(thirdEnable == 'true') // do something }

Participación en el concurso Nro.9 para                                                 Script to Check If Browser Accept 3rd Party Cookie
Participación Nro. 9

Tablero de aclaración pública

  • goldgain
    Organizador del concurso
    • 10 años atrás

    Hi Aneeshtclt,

    Before I started this contest, I already found the exact script from stackoverflow but I can't use it as my other script is unable to execute in < head > section.

    I need the 'thirdEnable' variable to be available in within the < body > < /body >. This is the main reason why I started the contest.

    • 10 años atrás