0

我有来自数据库的数据,我需要计算每次点击的视图,

我只需要计算当前小时的唯一点击次数。

将其保存在数据库中不是我的选择。并且让用户知道他/她已经点击了该数据

我应该为用户单击或会话的每个数据使用 cookie 吗?

谢谢。

4

1 回答 1

1

I would store it in a session, there is no need to send it back and forth with every page request, that would only slow things down, especially if the site is big and the internet connection of your visitor slow.

However, note that you can only display this information to your visitor if you use sessions or cookies, there is nothing that you can actually do with it unless you store in in a database or a text file.

于 2012-12-05T01:38:41.140 回答