4 Replies Latest reply: Jul 25, 2014 1:11 AM by BKBK RSS

    Change in back button behavior

    PapaMech

      We are upgrading from ColdFusion 9 to ColdFusion 11.  We noticed a change in back button behavior.  On pages running CF 9 the back button works, but on pages running CF 11, when clicking the back button, we get a browser "confirm form resubmission" message.  Since it is the same browser, it is clearly a change in ColdFusion.  Does anyone know when the change was made?  Is there a setting that controls the behavior?

       

      Thank you,

       

      David

        • 1. Re: Change in back button behavior
          BKBK MVP

          Coldfusion cannot be blamed here. It communicates only indrectly with the browser, through the web server. Even so, it is likely that the change in back-button behaviour is in the browser itself. It is warning you that you are about to resubmit the form which, in many ways, is quite nice of the browser.

           

          One obvious 'setting' you can use to prevent the back-button behaviour is redirection. For example, you may, after processing the form variables on the action page, use cflocation to redirect to another page.

          • 2. Re: Change in back button behavior
            PapaMech

            Hi BKBK,

             

            Thank you for taking the time to reply. 

             

            Sorry if I was not clear.  I have the same pages running on production on CF9 and in development on CF11 (as we are getting ready to upgrade our servers).  On CF9 the back button works.  On CF11 we get the form resubmit warning. I've tried this with Firefox and Chrome.  Because the differences are the version of ColdFusion and the environment (production / development) the cause is either a change in ColdFusion after CF9 or some (CF admin or IIS) setting. 

             

            Thanks,

             

            David

            • 3. Re: Change in back button behavior
              BKBK MVP

              We should ignore the difference in Coldfusion version for a moment. It might just be that the previous behaviour was incorrect and what you now observe, with CF11, is the correct behaviour.

               

              A form-resubmit warning is essential. In fact, it can even be vital in certain circumstances. It is telling you that someone, some process or some thread has attempted to resubmit a form.

               

              In your case, clicking the back button apparently refreshes the action page of the form. This is analogous, in business terms, to repeating an order that has already been placed. The related validation code, queries, etc. will run once again. Obviously an unwelcome situation.

              • 4. Re: Change in back button behavior
                BKBK MVP

                Still, the question remains why a certain behaviour is switched on in CF11, and off in CF9. Could you show us the code of the form page and action page, by private message if necessary.