webpage expired

Discussion in 'PHP' started by lew1s666, Oct 16, 2014.

  1. #1
    I am getting error on IE when I press the back button : Webpage has expired.

    I have property website in wordpress. So when I press search and go to property listing page and open one property , after when I want to go back I get the error: See here

    http://broe.ie/property-search-results/

    1. open a property in IE
    2. hit back button
     
    lew1s666, Oct 16, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    What in the world kind of IE do you use? Works fine here. (IE 10).
     
    PoPSiCLe, Oct 16, 2014 IP
  3. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #3
    not working on IE10 , and now I tried on Chrome and getting :
    Confirm Form Resubmission
     
    lew1s666, Oct 16, 2014 IP
  4. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #4
    You have to actually use the form in order to replicate this error.

    It is standard practice for browsers to do this as by going back you are technically submitting the form values again. In your case it may be a dumb feature but if it is a contact form or an order form it is probably a good thing that it does not get sent twice.

    What you probably should do is to use get parameters, you could make it a custom url with url rewrite. So you might have

    http://broe.ie/property-search-results/?option=ForSale&area=Dublin
    Code (markup):
    or

    http://broe.ie/property-search-results/?option=1&area=2
    Code (markup):
    or

    http://broe.ie/property-search-results/ForSale/Dublin/
    Code (markup):
    This will also be more SEO friendly as each search result would act as a page and users could link to a specific result.
     
    Anveto, Oct 16, 2014 IP
    ThePHPMaster likes this.
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    ... and that's what's going on. It's a protection to prevent the same form from being sent more than once; THOUGH usually that would only happen if you've done something STUPID like using a redirect after the submit instead of just processing it and loading a proper result page.

    I'm seeing that more and more where people are using endless pointless header() redirects after forms when there's really no excuse for it other than developer ineptitude and bad advice.... of course when it comes to the halfwit steaming pile of manure known as turdpress, developer ineptitude and bad coding practices are pretty much par for the course with it's insecure by design codebase, "I can haz intarnets" markup and scripttardery for nothing.

    .. as evidenced by sites like this one, with it's absurd 1.3 megabytes in 66 files to deliver 2.3k of plaintext and 9 content images that shouldn't even break 24k apiece -- meaning IMHO there's no reason for that page to break 256k in 12 files, well, other than the ineptitude of the people who created turdpress in the first place.
     
    Last edited: Oct 17, 2014
    deathshadow, Oct 17, 2014 IP