Freelancer : aneeshtclt
Partager :
Signaler la proposition

Sample code

Test if Third-Party Cookies are Enabled body { color: black; background: white none; } .error { color: #c00; } .loading { color: #888; } .hidden { display: none; } 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://third-party.example.com/step2.js.php', resultsEl = document.getElementById('3rd_party_cookie_test_results'), step2El = document.createElement('script'); // Update loading / results message resultsEl.innerHTML = 'Stage one complete, loading stage 2…'; // 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){ var resultsEl = document.getEl

Proposition n°3 du concours                                                 Script to Check If Browser Accept 3rd Party Cookie
Proposition n°3

Tableau de clarification publique

  • goldgain
    Titulaire du concours
    • il y a 10 ans

    The key is return a STATUS flag (eg: Var 3rdCookie = 'Yes') indicating whether the browser accept 3rd party cookie or not in the HTML BODY. Not just prompt to the screen. Don't direct copy the code from stackoverflow (dot) com as it is not my requirement. You need to modify it.

    • il y a 10 ans