I want to add a tool to my website which will tell the users how much time they spend on my site. I want to store a cookie, which will expire as soon as the user closes the website. So, if the website is closed, the amount of time will be saved in the database. But now I am a bit complicated. In which part of my code should I check the existence of the cookie. Should I do it after each line of code? That will slow down the web app. Please help me with this issue.
Aucun commentaire:
Enregistrer un commentaire