Answer the question
In order to leave comments, you need to log in
Why does Google Chrome Android do two redirects instead of one on a POST request?
<?php
if (!empty($_POST['text'])) {
header('Location: /test.php');
setcookie('testCookie', '1', time() + 3600, '/');
exit();
}
setcookie('testCookie', '0', time() + 3600, '/');
?><form action="" method="post">
<input name="text" type="text" value="text">
<button type="submit">submit</button>
</form>
testCookie: <?= $_COOKIE['testCookie'] ?? 'null' ?>
Answer the question
In order to leave comments, you need to log in
In general, as it turned out, Maxim Fedorov is right: this is some kind of cache.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question