Creating a redirect page that sends data to the server before transitioning to a new page can be achieved using JavaScript as shown below.
<body>
<script type="text/javascript">
****
Discussion of cookie-related transactions
****
document.createElement("img").setAttribute("src", "server.php?param1=cookiedata");
location.href = "new_page.html";
</script>
</body>
However, there are instances where
document.createElement("img").setAttribute("src","server.php?param1=cookiedata");
is not executed before redirecting to "new_page.html". This means that the data is not sent to "server.php".
Could this issue be related to the short redirect time?
Can you suggest a solution for this problem?