To mark data that appeared in the time of absence of the user on the website?

Hello, prompt, please, how you can implement the following idea.
When the user visits the site, there appear latest 10 news. Then, when the user leaves and comes back the next day, some news were added (updated).

Question: how can I do that new news, which appeared at the time of the absence on the site the user was marked as "new". Then you need to use $_COOKIES? If so, it will not show pliz example? Thank you!
July 9th 19 at 10:27
2 answers
July 9th 19 at 10:29
Record in the user profile the date of the last activity.
Date of update / create news > last activity date user = mark "new"
But if profiles no record in the session? - Emmet.Stoltenberg commented on July 9th 19 at 10:32
: It is possible in session, but will Balk at the period of her life, if you increase it there will be a bunch of junk. - Henderson_Beat commented on July 9th 19 at 10:35
: I think it is more correct to realize this is only for authorized users. - Henderson_Beat commented on July 9th 19 at 10:38
July 9th 19 at 10:31
From each entry You can store information about the date/time addition/change (in UTC of course). You can also somewhere to record the date/time the user accesses a list of articles (also in UTC of course). In this case, when you visit the site you can simply make a selection by date.
But where to store the date of the visit - it depends on the specifics of Your site, in cookies, can be anywhere in the database.

Find more questions by tags HTMLMySQLHTTP CookiesPHPJavaScript