I'm developing an application with Laravel 4.2. I have not configured cache and cache settings are default. I have a two step sign up form. After, submitting the second form successfully, I redirect to success page. But when I click on back button of browser, it takes me to second step form and all the data is pre filled. I tried adding following code to header -
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
And following code, after registration in complete (in controller function)-
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
But it did not work. I tried to set a filter with above code and call it after register controller function. I also tried following code, but it also didn't work.
Cache::flush()
How can I clear the form, when reached using back button of browser ?