Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

What is the right way to clear Flash Session?

I'm outputing flashSession in my View using this method - flashSession.output(). When i reload the page the flash messages are still there. How can i remove them in a right way? Sequence like this does not work: flashSession.output(). flashSession.clear().



6.9k
Accepted
answer

This should work automatically flashSession.output(), output has one parameter $remove and its default value is true. Looks like you are populating flash messages on reload again.



6.8k

yes you are right, when reload the page, i re-submit my form again and get the messages again. Thnx