Clearing the "form submit" cache: how?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • axlq

    Clearing the "form submit" cache: how?

    Situation: User submits a form, gets a page returned. User clicks
    the "reload button."

    Normal result: Browser asks to confirm re-submitting of the form
    data.

    That's not what I want. What I want is behavior like what Wikipedia
    does, as well as vBulletin forums and other nice php-based sites:

    Situation: User submits a form, gets a page returned. User clicks
    the "reload button."

    Desired Result: The current page simply re-loads and the user isn't
    asked to confirm re-submission of the form data. The form data
    isn't re-submitted.

    This may not be a php problem, but I tend to notice this on php
    sites because my php site doesn't exhibit this behavior, and I want
    it to. How do I accomplish this?

    -A
  • ZeldorBlat

    #2
    Re: Clearing the "form submit" cache: how?

    On Nov 17, 9:56 pm, a...@spamcop.ne t (axlq) wrote:
    Situation: User submits a form, gets a page returned. User clicks
    the "reload button."
    >
    Normal result: Browser asks to confirm re-submitting of the form
    data.
    >
    That's not what I want. What I want is behavior like what Wikipedia
    does, as well as vBulletin forums and other nice php-based sites:
    >
    Situation: User submits a form, gets a page returned. User clicks
    the "reload button."
    >
    Desired Result: The current page simply re-loads and the user isn't
    asked to confirm re-submission of the form data. The form data
    isn't re-submitted.
    >
    This may not be a php problem, but I tend to notice this on php
    sites because my php site doesn't exhibit this behavior, and I want
    it to. How do I accomplish this?
    >
    -A
    This question has been asked and answered many times in this
    newsgroup. With a little bit of searching you should be able to find
    it.

    Comment

    • axlq

      #3
      Re: Clearing the "form submit" cache: how?

      In article <ae57203b-6781-4068-b1b6-9317e3549e82@e1 g2000hsh.google groups.com>,
      ZeldorBlat <zeldorblat@gma il.comwrote:
      >On Nov 17, 9:56 pm, a...@spamcop.ne t (axlq) wrote:
      >Desired Result: The current page simply re-loads and the user isn't
      >asked to confirm re-submission of the form data. The form data
      >isn't re-submitted.
      >
      >This question has been asked and answered many times in this newsgroup.
      No, not really, as far as I can tell.
      >With a little bit of searching you should be able to find it.
      Perhaps I am using the wrong terminology in my search. All I find
      are articles about form data being lost, not on intentionally losing
      it.

      -A

      Comment

      • ZeldorBlat

        #4
        Re: Clearing the &quot;form submit&quot; cache: how?

        On Nov 17, 10:42 pm, a...@spamcop.ne t (axlq) wrote:
        In article <ae57203b-6781-4068-b1b6-9317e3549...@e1 g2000hsh.google groups.com>,
        >
        ZeldorBlat <zeldorb...@gma il.comwrote:
        >
        With a little bit of searching you should be able to find it.
        >
        Perhaps I am using the wrong terminology in my search. All I find
        are articles about form data being lost, not on intentionally losing
        it.
        >
        -A
        Perhaps "form double post" or "form double submission" would work?

        Comment

        • axlq

          #5
          Re: Clearing the &quot;form submit&quot; cache: how?

          In article <3e8391a8-b8f6-4e92-a6c6-ab508f1aa32e@b3 6g2000hsa.googl egroups.com>,
          ZeldorBlat <zeldorblat@gma il.comwrote:
          >On Nov 17, 10:42 pm, a...@spamcop.ne t (axlq) wrote:
          >In article <ae57203b-6781-4068-b1b6-9317e3549...@e1 g2000hsh.google groups.com>,
          >>
          >ZeldorBlat <zeldorb...@gma il.comwrote:
          >>
          >With a little bit of searching you should be able to find it.
          >>
          >Perhaps I am using the wrong terminology in my search. All I find
          >are articles about form data being lost, not on intentionally losing
          >it.
          >
          >Perhaps "form double post" or "form double submission" would work?
          Ah. Yes, thanks.

          MY searches only turned up non-useful information (and eventually my
          original posting). For searches by others in the future:

          Apparently the trick is to separate the form processing URL from the
          output URL. That is, have the form on page1.php execute page2.php,
          which does processing but no output, and then use header("Locatio n:
          page3.php") to redirect to the result page that actually does
          output. Then, refreshing page3.php will simply refresh the page
          without re-submitting the form on page1.php.

          -A

          Comment

          • get@alife.com

            #6
            Re: Clearing the &quot;form submit&quot; cache: how?

            In article <3e8391a8-b8f6-4e92-a6c6-
            ab508f1aa32e@b3 6g2000hsa.googl egroups.com>, zeldorblat@gmai l.com says...
            On Nov 17, 10:42 pm, a...@spamcop.ne t (axlq) wrote:
            In article <ae57203b-6781-4068-b1b6-9317e3549...@e1 g2000hsh.google groups.com>,

            ZeldorBlat <zeldorb...@gma il.comwrote:
            >With a little bit of searching you should be able to find it.
            -A
            >
            Perhaps "form double post" or "form double submission" would work?
            >
            perhaps if you just answered the damned question instead of being an arse
            it would save us all some time.

            Comment

            • Michael Fesser

              #7
              Re: Clearing the &quot;form submit&quot; cache: how?

              ..oO(axlq)
              >Apparently the trick is to separate the form processing URL from the
              >output URL.
              No, it can all be done on a single page. After the form processing send
              a Location header with the absolute URL of the current page back to the
              browser - that's it. The following GET request will replace the previous
              POST in the browser history, so a reload won't re-submit the form data.

              Micha

              Comment

              • Jerry Stuckle

                #8
                Re: Clearing the &quot;form submit&quot; cache: how?

                get@alife.com wrote:
                In article <3e8391a8-b8f6-4e92-a6c6-
                ab508f1aa32e@b3 6g2000hsa.googl egroups.com>, zeldorblat@gmai l.com says...
                >On Nov 17, 10:42 pm, a...@spamcop.ne t (axlq) wrote:
                >>In article <ae57203b-6781-4068-b1b6-9317e3549...@e1 g2000hsh.google groups.com>,
                >>>
                >>ZeldorBlat <zeldorb...@gma il.comwrote:
                >>>
                >>>With a little bit of searching you should be able to find it.
                >
                >>-A
                >Perhaps "form double post" or "form double submission" would work?
                >>
                >
                perhaps if you just answered the damned question instead of being an arse
                it would save us all some time.
                >
                And maybe he gets tired of answering the same question because you and
                others like you are too lazy to search for the answer. Even typing an
                asinine post like yours takes more time than searching for the correct
                answer.

                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                • John Dunlop

                  #9
                  Re: Clearing the &quot;form submit&quot; cache: how?

                  axlq:
                  Situation: User submits a form, gets a page returned. User clicks
                  the "reload button."
                  >
                  Desired Result: The current page simply re-loads and the user isn't
                  asked to confirm re-submission of the form data. The form data
                  isn't re-submitted.
                  Without a URL I can't tell, but I have a suspicion you are using the
                  POST method instead of the GET method. User-agents should make their
                  users aware if their actions are non-idempotent.



                  --
                  Jock

                  Comment

                  • axlq

                    #10
                    Re: Clearing the &quot;form submit&quot; cache: how?

                    In article <xdmdnXffneLYM9 3anZ2dnUVZ_jadn Z2d@comcast.com >,
                    Jerry Stuckle <jstucklex@attg lobal.netwrote:
                    >perhaps if you just answered the damned question instead of being an arse
                    >it would save us all some time.
                    >
                    >And maybe he gets tired of answering the same question because you and
                    >others like you are too lazy to search for the answer. Even typing an
                    >asinine post like yours takes more time than searching for the correct
                    >answer.
                    I've been on usenet over 20 years. I know enough to search for
                    an answer before I post, and I also know to expect a few arrogant
                    replies from the less experienced usenetters who think they have
                    answered all the questions already. The only reason I posted the
                    question in the first place was, OBVIOUSLY, that I didn't find
                    the answer in spite of my searches. The reason was that I wasn't
                    searching for the proper terms.

                    -A

                    Comment

                    • axlq

                      #11
                      Re: Clearing the &quot;form submit&quot; cache: how?

                      In article <494e8a99-2220-449a-bcd5-c017fa1c0110@i3 7g2000hsd.googl egroups.com>,
                      John Dunlop <john@dunlop.na mewrote:
                      >axlq:
                      >
                      >Situation: User submits a form, gets a page returned. User clicks
                      >the "reload button."
                      >>
                      >Desired Result: The current page simply re-loads and the user isn't
                      >asked to confirm re-submission of the form data. The form data
                      >isn't re-submitted.
                      >
                      >Without a URL I can't tell, but I have a suspicion you are using the
                      >POST method instead of the GET method. User-agents should make their
                      >users aware if their actions are non-idempotent.
                      >
                      >http://www.w3.org/2001/tag/doc/whenToUseGet.html
                      Well, yes. The words "resubmissi on of *form* data" should have made
                      it clear that I'm referring to POST, not GET.

                      Anyway, the rest of this thread contains the answer I was looking for.
                      Thanks.

                      -A

                      Comment

                      • Jerry Stuckle

                        #12
                        Re: Clearing the &quot;form submit&quot; cache: how?

                        axlq wrote:
                        In article <xdmdnXffneLYM9 3anZ2dnUVZ_jadn Z2d@comcast.com >,
                        Jerry Stuckle <jstucklex@attg lobal.netwrote:
                        >>perhaps if you just answered the damned question instead of being an arse
                        >>it would save us all some time.
                        >And maybe he gets tired of answering the same question because you and
                        >others like you are too lazy to search for the answer. Even typing an
                        >asinine post like yours takes more time than searching for the correct
                        >answer.
                        >
                        I've been on usenet over 20 years. I know enough to search for
                        an answer before I post, and I also know to expect a few arrogant
                        replies from the less experienced usenetters who think they have
                        answered all the questions already. The only reason I posted the
                        question in the first place was, OBVIOUSLY, that I didn't find
                        the answer in spite of my searches. The reason was that I wasn't
                        searching for the proper terms.
                        >
                        -A
                        >
                        If you've been on usenet over 20 years as you claim, then you should
                        have been able to figure out the search words to use.

                        I've been on a lot longer than you - stretching back to the arpanet days
                        in the early 70's. And I know there are always a few arrogant
                        usenetters who think that since they've been on for X number of years
                        they don't need to do their own homework.

                        --
                        =============== ===
                        Remove the "x" from my email address
                        Jerry Stuckle
                        JDS Computer Training Corp.
                        jstucklex@attgl obal.net
                        =============== ===

                        Comment

                        • John Dunlop

                          #13
                          Re: Clearing the &quot;form submit&quot; cache: how?

                          axlq:
                          The words "resubmissi on of *form* data" should have made
                          it clear that I'm referring to POST, not GET.
                          Which part of "resubmissi on of form data" do you think excludes GET?

                          --
                          Jock

                          Comment

                          • axlq

                            #14
                            Re: Clearing the &quot;form submit&quot; cache: how?

                            In article <1NmdnY89QpChyt _anZ2dnUVZ_uikn Z2d@comcast.com >,
                            Jerry Stuckle <jstucklex@attg lobal.netwrote:
                            >If you've been on usenet over 20 years as you claim, then you should
                            >have been able to figure out the search words to use.
                            Ah, but I haven't been doing php that long, or WWW programming, so I'm
                            not up on the jargon. If you don't know the search terms, your search
                            is bound to fail.
                            >I've been on a lot longer than you - stretching back to the arpanet days
                            >in the early 70's.
                            I personally doubt that, but I'll grant it.
                            >And I know there are always a few arrogant
                            >usenetters who think that since they've been on for X number of years
                            >they don't need to do their own homework.
                            Thank heavens I'm not one of them.

                            -A

                            Comment

                            • axlq

                              #15
                              Re: Clearing the &quot;form submit&quot; cache: how?

                              In article <12c916cb-9ce4-40e3-a1ce-065f1f94f40d@b3 6g2000hsa.googl egroups.com>,
                              John Dunlop <john@dunlop.na mewrote:
                              >axlq:
                              >
                              >The words "resubmissi on of *form* data" should have made
                              >it clear that I'm referring to POST, not GET.
                              >
                              >Which part of "resubmissi on of form data" do you think excludes GET?
                              Eh... you're right. I got so into the habit of forms using the POST
                              method that I forgot you could use GET as well.
                              -A

                              Comment

                              Working...