After display success/error message like "Item Added in cart" it won't remove from the page after refreshing the page. I am using Magento CE 2.0.7 version. Any one have the solution of this issue, please reply.

Also in login page error message won't display and after login success in next time login failure message will display on other page.


The issue has been addressed and fixed in the latest version of Magento 2.

If you have not found any solution yet, just upgrade the Magento. This will fix the problem.

I have tried it for Magento 2.1.6, which I upgraded to Magento 2.1.9.


there is a cookie record called "mage-messages". After deleting it, the old message won't be shown again.

I used the following code to remove it programmatically

private $_cookieManager;
public function __construct(
    \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager
) {
    $this->_cookieManager = $cookieManager;
private function _deleteMessage() {        

Hope it helps.

  • And when should I call this _deleteMessage(), so that it calls on every reload or when the user navigates to a different page? – summu Mar 11 at 14:30

at below repository people talking about cookie restriction mode issue for that


You can idea about that what is cookie restriction mode and how can you enable or disable that in below link


This is what I can help you for this problem

  • We already test all these, but not working – Ashish Jagnani Sep 11 '16 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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