cookie
cookie

Reputation: 1

Cookie limit on the site's individual pages

So I know browsers limit the cookie number to something like 200 ...or whatever (the idea is that there is a limit).

I need to mark a site's page as viewed by the current visitor, so I'm setting a cookie viewed=true.

better explanation of what I want:

Cookies can be set as global (for the entire site, visible on all pages), or local (for a certain page only).

Upvotes: 0

Views: 537

Answers (3)

Joseph Marikle
Joseph Marikle

Reputation: 78540

I think the ideal way would be to set a user ID cookie and, like the others said, store any information tied to that user in your database.

Upvotes: 1

Naftali
Naftali

Reputation: 146310

Instead of using cookies (which is on the user's end).

When a user goes to one of your pages, save to the data base that he/she went there.

Before the database save check of the user was already there before, and if that is true then don't save it to the database.

Upvotes: 0

gpojd
gpojd

Reputation: 23075

You can set a session cookie and store the viewed pages on the server.

Upvotes: 0

Related Questions