John the Painter
John the Painter

Reputation: 2615

Using cookies to remember if an article has been read or not - identifiers to note

I'm looking to set some sort of 'you've read this article' function on a site I'm building.

A small circle will be displayed beside the heading of each article that has/has not been read - unsure what works best. The former probably.

I'm wondering if anyone has worked on this sort of thing before/has it a name. I'm guessing some sort of cookie would be useful. However, I'm unsure whether it should just exist for that session and hence some simple CSS/JS would be suffice.

Any thoughts on the subject and any examples?

Thanks, R

Upvotes: 0

Views: 41

Answers (1)

Ron van der Heijden
Ron van der Heijden

Reputation: 15080

I would create a youHaveRead table which contains the userid and the articleid.

Do not use cookies because a user has control over it.

Also if you work with multiple devices you can't share the cookie.

For example you want those notifications everywhere like your mobile phone, computer, tablet, e-reader etc...

And this way you can view statistics about it to. ;)

But thats just my opinion.

Upvotes: 1

Related Questions