SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: How do you avoid the dreaded "re-submit" POST data issue?

Hybrid View

  1. #1
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool How do you avoid the dreaded "re-submit" POST data issue?

    I see websites like pof.com do this and I'm curious how it's done.

    Basically I'm referring to how a website can be constructed so that when people submit information to the server through forms (or w/e other ways it can be done) if they click the back button they do not have to re-submit form data. I see it quite often on websites so I know it's possible and I don't think it's an Ajax thing...

    Thanks in advance.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,424
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Get-Post-Redirect.

    Refresh gets the redirected page you GET, back takes you back to the previous GET.

  3. #3
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Get-Post-Redirect.

    Refresh gets the redirected page you GET, back takes you back to the previous GET.
    Hrm, well I've done some research on the subject and this is what I have concluded so far.

    I should have the HTML form submit to the same page that it is on, and then use a redirect rule (say with PHP for example) to cause a 302 redirect to go to a new page?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •