JavaScript IE11 Stopped Accepting Cross-Domain Cookie Policies

I just noticed an odd cookie policy problem that only affects IE. I could only test on IE11. Perhaps you know a workaround?

Step 1. This requires 2 domains. We'll call them cart.com and tracking.com.

Step 2. Using IE11, browse over to https://tracking.com/index.php and it should contain this:

<?php

setcookie('track_test', 'mytest', time()+60*60*24*365, '/', '.tracking.com');
?>
<p>COOKIE SET</p>
<p><a target='_blank' href="https://cart.com/purchase.php">Buy Now</a></p>

Step 3. Click the Buy Now in https://tracking.com/index.php and it should take you to https://cart.com/purchase.php, which should contain this:

// ABOVE THIS LOOKS LIKE AN ORDINARY HTML5 PAGE THAT LOADS jQuery.
<script type="text/javascript">
$(document).ready(function(){

  $('BODY').append('<img alt="" width="1" height="1" src="https://tracking.com/pixel.php" />');

});
</script>

Step 4. So, viewing purchase.php should fire https://tracking.com/pixel.php, which looks like so:

<?php
file_put_contents('output.txt',var_export($_COOKIE,TRUE),FILE_APPEND);
// RETURN FAKE IMAGE RESULT
header('Content-type: image/gif');
header('p3p:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
die(base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw=='));

Step 5. Now, view your output.txt on the tracking.com server. You'll find it empty. That's the problem -- it can't read the cookies. There's a cookie policy restriction, even though I have sent the proper "ignore all that, my friend" cookie header.

Now, repeat the process with Chrome and Firefox -- no issues.

Okay, so, if you go back and switch the pixel from Javascript to purely HTML to call that pixel, it won't work that way either. But if you call the pixel manually in the URL of your browser, it works just fine from IE. Our tracking used to work, so I believe this problem just occurred with IE11.

But here's my conundrum -- I'm working with a third-party, and they are passing some extra things to my pixel script like order total and order transaction ID via query parameters on the end of the pixel script URL, and those are only available to my script via Javascript. That's why I can't use the HTML technique to load that pixel script -- but must inject it at runtime using jQuery (or Javascript) in order to get that order total and order transaction ID.

Answer:1

WHAT I WANT TO BUILD: I have such stuff in mongo: { team1: 'Love', team2: 'Popa', score: 3 } { team1: 'Love' team2: 'Ola' score: 1 } { team1: 'Popa' team2: 'Ola' score: 5 } { ...

WHAT I WANT TO BUILD: I have such stuff in mongo: { team1: 'Love', team2: 'Popa', score: 3 } { team1: 'Love' team2: 'Ola' score: 1 } { team1: 'Popa' team2: 'Ola' score: 5 } { ...

  1. mongodb simple find query
  2. mongodb tutorial find
  3. mongodb findone tutorial

AppFunction.js export default function myFunction() { var str1 = "Hello "; var str2 = "world!"; var res = str1.concat(str2); document.getElementById("demo").innerHTML = res; } App.js import ...

AppFunction.js export default function myFunction() { var str1 = "Hello "; var str2 = "world!"; var res = str1.concat(str2); document.getElementById("demo").innerHTML = res; } App.js import ...

  1. import function from file reactjs
  2. reactjs import function from another file

I am trying to create a dropdown menu with Bootstrap, with images and a long text, that may have to be word-wrapped to be inside a width of 500px I tried suggestions like this: .dropdown-menu { ...

I am trying to create a dropdown menu with Bootstrap, with images and a long text, that may have to be word-wrapped to be inside a width of 500px I tried suggestions like this: .dropdown-menu { ...

  1. bootstrap dropdown menu not working
  2. bootstrap dropdown menu on hover
  3. bootstrap dropdown menu example
  4. bootstrap dropdown menu width
  5. bootstrap dropdown menu position
  6. bootstrap dropdown menu navbar
  7. bootstrap dropdown menu scrollable
  8. bootstrap dropdown menu color
  9. bootstrap dropdown menu submenu
  10. bootstrap dropdown menu right
  11. bootstrap dropdown menu not showing
  12. bootstrap dropdown menu icon
  13. bootstrap dropdown menu select
  14. bootstrap dropdown menu off screen
  15. bootstrap dropdown menu form
  16. bootstrap dropdown menu checkbox
  17. bootstrap dropdown menu full width
  18. bootstrap dropdown menu react
  19. bootstrap dropdown menu left
  20. bootstrap dropdown menu events

Hello say i have an array of objects that looks like this let myArray = [ {item1: true}, {item2: false}, {item3: true}, {item4: false} ] How would I iterate though this to return a new array ...

Hello say i have an array of objects that looks like this let myArray = [ {item1: true}, {item2: false}, {item3: true}, {item4: false} ] How would I iterate though this to return a new array ...