I have an idea of how it should be done, but I'm curious if there is actually a best practice. My goal is to present messages like upcoming maintenance but have the user be able to kill those messages off if they don't want to see them. My assumption is that most people use cookies for this.
1) The application posts the message with a specific ID.
2) If the user kills the message a cookie is created with that ID and a lifespan that goes just beyond the end of the event associated with the message.
3) If the user clears the cookie before the event ends the message reappears in the application.
4) And obviously when the event is over the message isn't displayed and eventually the cookie disappears.
Is that how it normally works? Is there a better way? The only other way I can think of involves database details but that would require setup and cleanup activities to keep things tidy.