Answer the question
In order to leave comments, you need to log in
Cookie counter junk in Chrome, how to cure?
I'm learning php on the Specialist's video course. Now the lesson on cookies and I had a problem with them in the chrome browser.
$visitCounter = 0;
if(isset($_COOKIE['visitCounter'])){
$visitCounter = $_COOKIE['visitCounter'];
}
$visitCounter ++;
$lastVisit = '';
if(isset($_COOKIE['lastVisit']))
$lastVisit = date('d-m-y H:i:s',$_COOKIE['lastVisit']);
setcookie('visitCounter', $visitCounter, 0x7FFFFFFF);
setcookie('lastVisit', time(), 0x7FFFFFFF);
Answer the question
In order to leave comments, you need to log in
I think that the event should be hung not on the document, but on the input form itself
. should be something like this:
$('.text').on('input', function () {
clearInterval(timerPostAuthor);
});
Only in this case the execution of setInterval will stop. But, you can restart a new interval in the function of the same event
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question