How to make JavaScript run only once per visitor (type if already registered in the browser's cokkies, do not run anymore).
<?php
$tmp='<script>
Push.create("Olá Mundo!", {
body: "Esta é uma mensagem nova",
icon: "images/logo.jpg",
timeout: 4000,
onClick: function() {
window.location="http://www.google.com.br";
this.close();
}
});
</script>';
echo $tmp;
?>