# Solution to the Back button / double flash problem

**URL:** <https://www.ruby-forum.com/t/solution-to-the-back-button-double-flash-problem/109790>\
**Category:** Rails\
**Created:** [July 19, 2007, 3:01am UTC](https://www.ruby-forum.com/t/solution-to-the-back-button-double-flash-problem/109790 "2007-07-19T03:01:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [July 19, 2007, 3:01am UTC](https://www.ruby-forum.com/t/solution-to-the-back-button-double-flash-problem/109790/1 "2007-07-19T03:01:02Z")

</div>

Often you use flash to show a one time only status message (like “Your  
account has been billed $21.50”). The problem being that when the  
user goes on to another page, and hits back, they see it again, and  
often get worried. Is there anyway to ensure that flash is displayed  
only the first time, and not after hitting Back? (Perhaps using  
JavaScript to detect this…)
