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?
The answer is, "it depends". If you want the setting to persist across visits to the site, even from different computers, store it in the user's profile in your database. If you don't have a user database, store it in a persistent cookie. If you don't want it to persist (too long), store it in the (PHP?) session. If you won't want it to persist at all, store it in a per-session cookie (i.e. one without an expiry date)