After the new user registers, I need to redirect the user to the home page and display a Twitter-style welcome message. At first I tried to use the jquery cookie plugin to store my message and display it on a redirected page if a cookie is present, but the problem is that it does not work in all browsers. Firfox on Safari does not delete the cookie, so the message continues to be displayed every time the browser is updated. Here is the code:
if ($.cookie("message")) {
TwentyQuestions.Common.ShowMessageBar($.cookie("message"), 7000);
$.cookie('message', "any_value", { expires: -10 })
}
So, I decided to use querystring instead, but now the problem is similar. When the home page loads, a query string is detected and a message is displayed. But how to remove the query string from the URL so that the message does not appear every time the page is refreshed?
Thank!
source
share