Professional Web Applications Themes

Avoid "page has expired" message - PHP Development

Hi all, I have a website with a classic search form. When i go to results page and press the "back" button the message appears (The page has expired). As you know, pressing F5 resends the form and everything works again. The method I use is POST and don't want to use GET. In [url]www.easyjet.com[/url] for example this doesn't happens and when you press "back", it returns to the form and don't loose the search cryteria. Any idea? I've tried sending some headers about cache, but it doesn't work. this is what I tried: $caducidad = 30 * 60; // ...

  1. #1

    Default Avoid "page has expired" message

    Hi all,

    I have a website with a classic search form. When i go to results page and
    press the "back" button the message appears (The page has expired). As you
    know, pressing F5 resends the form and everything works again.

    The method I use is POST and don't want to use GET. In [url]www.easyjet.com[/url] for
    example this doesn't happens and when you press "back", it returns to the
    form and don't loose the search cryteria.

    Any idea? I've tried sending some headers about cache, but it doesn't work.

    this is what I tried:
    $caducidad = 30 * 60; // 3 minutos
    Header("Expires: " . gmdate("D, d M Y H:i:s", time() + $caducidad) . "GMT");



    Victor Gil Guest

  2. #2

    Default Re: Avoid "page has expired" message


    "Victor Gil" <nopongomail.com> wrote in message
    news:c64c1q$7unbb$1ID-208022.news.uni-berlin.de...
    > Hi all,
    >
    > I have a website with a classic search form. When i go to results page and
    > press the "back" button the message appears (The page has expired). As you
    > know, pressing F5 resends the form and everything works again.
    >
    > The method I use is POST and don't want to use GET. In [url]www.easyjet.com[/url] for
    > example this doesn't happens and when you press "back", it returns to the
    > form and don't loose the search cryteria.
    >
    > Any idea? I've tried sending some headers about cache, but it doesn't
    work.
    >
    > this is what I tried:
    > $caducidad = 30 * 60; // 3 minutos
    > Header("Expires: " . gmdate("D, d M Y H:i:s", time() + $caducidad) .
    "GMT");
    >
    >
    >
    Why not just get rid of the header() call?
    RG



    Žed Eye Media - Richard Grove Guest

  3. #3

    Default Re: Avoid "page has expired" message

    Victor Gil spilled the following:
    > Hi all,
    >
    > I have a website with a classic search form. When i go to results page and
    > press the "back" button the message appears (The page has expired). As you
    > know, pressing F5 resends the form and everything works again.
    >
    > The method I use is POST and don't want to use GET. In [url]www.easyjet.com[/url] for
    > example this doesn't happens and when you press "back", it returns to the
    > form and don't loose the search cryteria.
    >
    > Any idea? I've tried sending some headers about cache, but it doesn't
    > work.
    >
    > this is what I tried:
    > $caducidad = 30 * 60; // 3 minutos
    > Header("Expires: " . gmdate("D, d M Y H:i:s", time() + $caducidad) .
    > "GMT");
    Don't use Microsoft Internet Explorer?

    C.
    Colin McKinnon Guest

  4. #4

    Default Re: Avoid "page has expired" message

    >
    > Don't use Microsoft Internet Explorer?
    >
    > C.
    is this an advice????

    I can't tell people what navigator to use...

    Please anyone knows a solution? but a programming solution, please


    Victor Gil Guest

  5. #5

    Default Re: Avoid "page has expired" message

    "Victor Gil" <nopongomail.com> writes:
    > Hi all,
    >
    > I have a website with a classic search form. When i go to results page and
    > press the "back" button the message appears (The page has expired). As you
    > know, pressing F5 resends the form and everything works again.
    >
    > The method I use is POST and don't want to use GET. In [url]www.easyjet.com[/url] for
    > example this doesn't happens and when you press "back", it returns to the
    > form and don't loose the search cryteria.
    >
    > Any idea? I've tried sending some headers about cache, but it doesn't work.
    >
    > this is what I tried:
    > $caducidad = 30 * 60; // 3 minutos
    > Header("Expires: " . gmdate("D, d M Y H:i:s", time() + $caducidad) . "GMT");
    >
    Okay, we had the same problems on some projects where people
    want to go back a page and not get the expired message. The following
    should do it, in this case we give them 5 minutes -- change as you
    disire

    header("Cache-Control: max-age=300, must-revalidate");


    Hope this helps.
    Best regards!
    --
    John
    __________________________________________________ _________________
    John Murtari Software Workshop Inc.
    jmurtarifollowing domain 315.635-1968(x-211) "TheBook.Com" (TM)
    [url]http://thebook.com/[/url]
    John Murtari Guest

Similar Threads

  1. Replies: 0
    Last Post: April 12th, 11:39 PM
  2. WSE 2.0 SP2 - TimeZone, "Message Expired"
    By Benjamin in forum ASP.NET Web Services
    Replies: 7
    Last Post: January 14th, 11:11 PM
  3. CFChart - message: "Image Expired .."
    By kyle969 in forum Coldfusion - Getting Started
    Replies: 0
    Last Post: May 16th, 01:38 PM
  4. Replies: 2
    Last Post: May 20th, 12:45 PM
  5. "Message Expired" Error
    By Jose Escobar in forum ASP.NET Web Services
    Replies: 0
    Last Post: September 13th, 12:23 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139