I have facing in cache issue in my magento 2 store here if i submit any form getting error and success message coming when refresh page.i don't understand why this issue comes again and again .if any one facing same issue please suggest me and reply me as soon as

enter image description here


1 Answer 1


I have got the solution this code comment now

/*$(window).on('beforeunload', function () {
                $.cookieStorage.set('mage-messages', '');
            });  */                              

added the code here

            jQuery( ".messages" ).html('');
        }, 50000);

its working for now in backend side cache always enable

  • in which file you added the above code Sep 16, 2020 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.