Sunday, 25 November 2012

Avoid Document Expire while hitting browser back

Using  Get Post Get rule you can avoid this.
  • Let say I have example1.php example2.php & example3.php
  • I am posting some value from example1.php to example2.php then i did all the DB stuff as per my need and rendered the page (Not Redirected - Just posted and the page got rendered).
  • After submitting values from example2.php to sometest.php and I have redirected the page to example3.php. Now if you click browser back the Document will Expire.
    • To Avoid this we can post the values from example1.php to some other PHP and then we need to Redirect the user to example2.php
    • This is the GPG rule which every developer needs to follow to avoid Document expire and also to avoid redundant entry in DB on refreshing the page.

No comments:

Post a Comment