I have a simply code:
<?php
if( isset($_POST['cnt']) ) {
$_SESSION['counter'] += 1;
}
echo $_SESSION['counter'];
echo '<button id="b1">Count</button>';
?>
<script>
$("#b1").click(function(){
$.post("index.php", { cnt: 1 });
location.reload();
});
</script>
The script without problems counts clicks on Chrome or Edge, but it completely doesn't work on FF and IE. Where could be the problem ?