对话框“不再显示此内容” boolean: 在哪里存储价值?
我有一个 JavaScript 弹出对话框,每当用户调用特定事件时就会出现,这可能很烦人。
我在服务器端使用带有数据库连接的 Ruby on Rails。
所以我正在考虑一个输入复选框,以便对话框不会再次显示,但用户应该能够再次更改该值。
我将在哪里存储布尔值?在数据库、会话、甚至cookie中?
I have a JavaScript pop-up dialog that appears whenever a user calls a specific event, which can be annoying.
I am using Ruby on Rails on server-side with a database connection.
So I am thinking about an input checkbox so that the dialog won't show up again, but the user should be able to change the value again.
Where would I store the boolean value for that? In the database, session, or even cookie?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)