Why Page Expires?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    Why Page Expires?

    When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new
    page was arrive.

    Then, if I press browser back button it says that: "page has expired".

    Why???
    Can I fix it or it is client side?

    I use <input tupe=submit> instead of links because it goes with my page
    style.
    I dont use <input type=button> because it requires javascript and it does
    not work with browsers that not support javascript.

    Thanks


  • Andy Hassall

    #2
    Re: Why Page Expires?

    On Sun, 21 Dec 2003 20:26:14 +0200, "<- Chameleon ->"
    <cham_gss@hotma il.NOSPAM.com> wrote:
    [color=blue]
    >When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new
    >page was arrive.
    >
    >Then, if I press browser back button it says that: "page has expired".
    >
    >Why???
    >Can I fix it or it is client side?[/color]

    It's supposed to. POST is for when posting a form has a side-effect, so you
    want to prevent doing it twice.

    If you want to be able to go back, because posting the form again would not
    cause a problem, use <form method="get" ...>

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Guest's Avatar

      #3
      Re: Why Page Expires?

      > >When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a
      new[color=blue][color=green]
      > >page was arrive.
      > >
      > >Then, if I press browser back button it says that: "page has expired".
      > >
      > >Why???
      > >Can I fix it or it is client side?[/color]
      >
      > It's supposed to. POST is for when posting a form has a side-effect, so[/color]
      you[color=blue]
      > want to prevent doing it twice.
      >
      > If you want to be able to go back, because posting the form again would[/color]
      not[color=blue]
      > cause a problem, use <form method="get" ...>[/color]

      it work now! thanks!


      Comment

      • Geoff Muldoon

        #4
        Re: Why Page Expires?

        cham_gss@hotmai l.NOSPAM.com says...[color=blue]
        > When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new
        > page was arrive.
        >
        > Then, if I press browser back button it says that: "page has expired".
        >
        > Why???
        > Can I fix it or it is client side?[/color]

        Think. "expired" - when? from where?
        Clue #1: the BROWSER back button.
        Clue #2: client-side browser caching.
        [color=blue]
        > I use <input tupe=submit> instead of links because it goes with my page
        > style.
        > I dont use <input type=button> because it requires javascript and it does
        > not work with browsers that not support javascript.[/color]

        Wrong, <input type=button> requires ZERO javascript. Unfortunately,
        many developers use javascript with it to change button images on
        rollover, but that isn't mandatory.

        Clue #3: This is a PHP group, next time try:
        comp.infosystem s.www.authoring.html

        GM

        Comment

        • Geoff Muldoon

          #5
          Re: Why Page Expires?

          andy@andyh.co.u k says...[color=blue]
          > On Sun, 21 Dec 2003 20:26:14 +0200, "<- Chameleon ->"
          > <cham_gss@hotma il.NOSPAM.com> wrote:
          >[color=green]
          > >When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new
          > >page was arrive.
          > >
          > >Then, if I press browser back button it says that: "page has expired".[/color]
          >
          > It's supposed to. POST is for when posting a form has a side-effect, so you
          > want to prevent doing it twice.[/color]

          Um, wouldn't that be by hitting the reload/refresh button? Hitting the
          back button should just re-display the form prior to the submit.

          Geoff M

          Comment

          • Andy Hassall

            #6
            Re: Why Page Expires?

            On Mon, 22 Dec 2003 14:51:29 +1100, Geoff Muldoon
            <gmuldoon_remov e_this_bit_@scu .edu.au> wrote:
            [color=blue]
            >andy@andyh.co. uk says...[color=green]
            >> On Sun, 21 Dec 2003 20:26:14 +0200, "<- Chameleon ->"
            >> <cham_gss@hotma il.NOSPAM.com> wrote:
            >>[color=darkred]
            >>>When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a new
            >>>page was arrive.
            >>>
            >>>Then, if I press browser back button it says that: "page has expired".[/color]
            >>
            >> It's supposed to. POST is for when posting a form has a side-effect, so you
            >> want to prevent doing it twice.[/color]
            >
            >Um, wouldn't that be by hitting the reload/refresh button? Hitting the
            >back button should just re-display the form prior to the submit.[/color]

            Hm, that's true - unless some cache control headers were sent?

            --
            Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
            Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

            Comment

            • Rob Gudgeon

              #7
              Re: Why Page Expires?


              "Andy Hassall" <andy@andyh.co. uk> wrote in message
              news:6ilduv8rtv p9u5dm63ifgakdi bemmbdk8a@4ax.c om...[color=blue]
              > On Mon, 22 Dec 2003 14:51:29 +1100, Geoff Muldoon
              > <gmuldoon_remov e_this_bit_@scu .edu.au> wrote:
              >[color=green]
              > >andy@andyh.co. uk says...[color=darkred]
              > >> On Sun, 21 Dec 2003 20:26:14 +0200, "<- Chameleon ->"
              > >> <cham_gss@hotma il.NOSPAM.com> wrote:
              > >>
              > >>>When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a[/color][/color][/color]
              new[color=blue][color=green][color=darkred]
              > >>>page was arrive.
              > >>>
              > >>>Then, if I press browser back button it says that: "page has expired".
              > >>
              > >> It's supposed to. POST is for when posting a form has a side-effect,[/color][/color][/color]
              so you[color=blue][color=green][color=darkred]
              > >> want to prevent doing it twice.[/color]
              > >
              > >Um, wouldn't that be by hitting the reload/refresh button? Hitting the
              > >back button should just re-display the form prior to the submit.[/color]
              >
              > Hm, that's true - unless some cache control headers were sent?
              >
              > --
              > Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
              > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)[/color]


              [color=blue][color=green]
              > >Hitting the back button should just re-display the form prior to the[/color][/color]
              submit.

              Not in the page with the form on it was itself generated from a POSTed form?

              Rob


              Comment

              • Andy Hassall

                #8
                Re: Why Page Expires?

                On Mon, 22 Dec 2003 13:25:24 +0000 (UTC), "Rob Gudgeon"
                <robin.gudgeon@ SPAMTRAP.bt.com > wrote:
                [color=blue][color=green][color=darkred]
                >>>>> When I complete a <FORM METHOD=POST> and I press <INPUT TYPE=SUBMIT> a
                >>>>> new page was arrive.
                >>>>>
                >>>>> Then, if I press browser back button it says that: "page has expired".
                >>>>
                >>>> It's supposed to. POST is for when posting a form has a side-effect,
                >>>> so you want to prevent doing it twice.
                >>>
                >>> Um, wouldn't that be by hitting the reload/refresh button? Hitting the
                >>> back button should just re-display the form prior to the submit.[/color]
                >>
                >> Hm, that's true - unless some cache control headers were sent?[/color]
                >
                >Not in the page with the form on it was itself generated from a POSTed form?[/color]

                Ah, that's it - need at least two POSTs in the chain for IE to kick in with
                the message:

                "Warning: Page has Expired The page you requested was created using information
                you submitted in a form. This page is no longer available. As a security
                precaution, Internet Explorer does not automatically resubmit your information
                for you.

                To resubmit your information and view this Web page, click the Refresh button."

                Mozilla pops up a warning to the same effect in a messagebox in the same
                situation.

                --
                Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
                Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

                Comment

                • FLEB

                  #9
                  Re: Why Page Expires?

                  Regarding this well-known quote, often attributed to Geoff Muldoon's famous
                  "Mon, 22 Dec 2003 13:50:33 +1100" speech:
                  [color=blue][color=green]
                  >> (Snip the actual question, and get on to picky points)[/color][/color]
                  [color=blue]
                  > Wrong, <input type=button> requires ZERO javascript. Unfortunately,
                  > many developers use javascript with it to change button images on
                  > rollover, but that isn't mandatory.
                  >[/color]

                  I'll see your "Wrong" and raise you one. You need JavaScript to do
                  /anything/ useful with a FORM BUTTON element. SUBMITS, RESETs, and FORM
                  IMAGEs work on their own, but a FORM BUTTON without any JavaScript just
                  sits there and looks clicky.

                  --
                  -- Rudy Fleminger
                  -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                  (put "Hey!" in the Subject line for priority processing!)
                  -- http://www.pixelsaredead.com

                  Comment

                  • Geoff Muldoon

                    #10
                    Re: Why Page Expires?

                    In article <jooap8qegp9n.1 860veqfs2svv.dl g@40tude.net>,
                    soon.the.sp@mme rs.and.evil.one s.will.bow-down-to.us says...[color=blue]
                    > Regarding this well-known quote, often attributed to Geoff Muldoon's famous
                    > "Mon, 22 Dec 2003 13:50:33 +1100" speech:
                    >[color=green][color=darkred]
                    > >> (Snip the actual question, and get on to picky points)[/color][/color]
                    >[color=green]
                    > > Wrong, <input type=button> requires ZERO javascript. Unfortunately,
                    > > many developers use javascript with it to change button images on
                    > > rollover, but that isn't mandatory.
                    > >[/color]
                    >
                    > I'll see your "Wrong" and raise you one. You need JavaScript to do
                    > /anything/ useful with a FORM BUTTON element. SUBMITS, RESETs, and FORM
                    > IMAGEs work on their own, but a FORM BUTTON without any JavaScript just
                    > sits there and looks clicky.[/color]

                    Yep, my bad. Was thinking <input type=image>.

                    GM

                    Comment

                    Working...