I have implemented the EasyAjax extension by Vladimir Fishchenko, which is an amazing extension that allows you to make ANY Magento request via Ajax. One problem I am having relates to session messages being stored on Ajax requests.
After executing an Ajax request, like adding a product to the cart for example, session messages that were set during that request appear on subsequent pages that implement the global_messages block. Typically since the page would refresh after adding to the cart, the session messages would be displayed as expected, however because this request is made with Ajax, the session messages are stored but not displayed until the user navigates to another page (by which time the message is a page late).
Is there a way to prevent messages from being stored in the session if the request is Ajax? I can check if a request is Ajax using Mage::getSingleton('easyAjax/core')->isEasyAjax()
, but I am unsure of where to implement this.