I have Following pseudo Code
<script>
var a=fetching data which taking much time;
document.cookie = "testing="+a;
</script>
<?php
$testing=$_COOKIE["testing"];
echo($testing);
?>
I m trying to get a single string value from Third party Api which taking almost 5 seconds using my internet . When I set timeout it work fine and save value in cookie. But when I run above code it. I does not saved the value and go to Php Scripting. I want that first Cookies should be set using Script than we should go to PHP