doushua7737 2013-09-05 15:57
浏览 24

跟踪客人历史互动的最佳方式是什么?

Currently in development is a PHP site where anyone can reply to peoples listings. They do not require a login or account.

What I would like to achieve is to inform the users if they have already responded to a listing and when. Because they are not logged in I cannot simply save responses in a database mapped to a user.

My initial conception is to use cookies. Saving the listing IDs and timestamp. But this could result in numerous cookies being stored. The other option to store all in info in one cookes via a coded string. IE code the array into a string and save it in the cookies. But my concern here is the data in the cookies will become quite large.

Are there limits on the count of cookies and/or the data within a cookies. Are there any other better methods to achieve the same results. IP addresses are unreliable and I do not think will be accurate. If cookies are used they would need to be maintained when listing get deleted and the data is no longer relevant.

  • 写回答

1条回答 默认 最新

  • douye8500 2013-09-05 16:11
    关注

    I would be concerned about the reliability of the cookies as well. Firstly, people tend to use several browsers on several devices, and cookies approach limit it to one. Or, what is worse, different results on different devices. Secondly, one could just delete cookies. Of course, it's not an often thing, but still - you won't achieve 100% working thing.

    What I would suggest is to add an optional login/register system for those who DO NEED that function, and I think that if they need it, they will register.

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?