I'm using jQuery and Laravel's session flash data to show a notification after every CRUD action. For example:
/*
*
* Update code goes here
*/
return Redirect::route('profile')->with('flashMessage', 'Profile updated');
The flash data is by definition available only for the next request. However, if I go to another page (directly after the notification was shown) and hit the browser back button, the flash data is still there, causing the notification to show up again, but this time with no logical reason.
Is there a way to prevent this? I'm testing in Chrome.