Answer the question
In order to leave comments, you need to log in
How to remember user action between pages?
Colleagues, correct me if I didn't ask the question correctly...
The bottom line is this:
There is a pop-up message in the site header with the close selector.
$(".close").on("click",function(){
$(".message").fadeOut('slow');
});
Answer the question
In order to leave comments, you need to log in
Save a label to the session or local storage about what has already been opened.
And then if (!localStorage.getItem('isOpen')) { open menu }
Either cookie or localstorage. Store something like popup_shown = true/false there. On page load, check its value and show/hide your message. When clicked, it changes to false.
It all depends on what kind of message you are displaying. If it is the same always and for everyone (for example, notification of planned technical work), then you can really put a flag on the client.
And if you display one-time messages there ("changes saved", "you are registered", etc.), then you need to deal with the server part - why it displays irrelevant messages.
To hell with half measures! Let's take the Mozilla LocalForage lib !
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question