in reply to Re^2: /perl5.10/bin and linux
in thread Reaped: /perl5.10/bin and linux

Visit Nodes You Wrote, Recently Active Threads, Newest Nodes, and/or Message Inbox to keep an eye on your posts. Once you've posted something, don't reload the page (normally, browsers should warn about resubmitting form data anyway). See also PerlMonks for the Absolute Beginner.

Replies are listed 'Best First'.
Re^4: /perl5.10/bin and linux
by afoken (Chancellor) on Jul 24, 2018 at 06:30 UTC
    Once you've posted something, don't reload the page (normally, browsers should warn about resubmitting form data anyway)

    I think this is a bug.

    The usual way to handle a successful HTTP POST request is to redirect to a page that will be fetched via GET (instead of delivering the content directly in reply to the POST request). Reloading that page has no side effects like reposting. See also Post/Redirect/Get.

    Another option that needs more effort and more code is to include a token in the HTTP form that is send via POST, and to invalidate the token once it has been sent.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      It's more a worst practice than a bug. The browser does warn when resubmitting a POST. So the user has some control/feedback.