SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Document Expired?

    When I hit the back button in my browser I get this...
    Document Expired

    This document is no longer available.

    The requested document is not available in Firefox's cache.As a security precaution, Firefox does not automatically re-request sensitive documents.Click Try Again to re-request the document from the website.
    What is causing that?!

    (I am REALLY FREAKED OUT that I made a poor Design Decision and now all of my code is for not?!)



    Debbie

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    This happens when you back up onto a form submission (POST data) that is not in cache. It's a security measure in Firefox.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    This happens when you back up onto a form submission (POST data) that is not in cache. It's a security measure in Firefox.
    So what does that mean to me?!

    (Short of seeing all of my code...) Is there a problem with how I coded my pages?

    Do I have any Security Issues/Concerns?

    Should I have code to prevent this or handle it better?

    Or is this just par for the course on the web?


    Debbie

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was your previous page submitted via a POST or a GET? it's totally normal if it was submitted via POST

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ultra1 View Post
    Was your previous page submitted via a POST or a GET? it's totally normal if it was submitted via POST
    All of my pages use POST, but I was just going from index.php to create_account.php (via page header) to log_in.php (via page header) to reset_password.php back to log_in.php when I got the error.


    Debbie

  6. #6
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    All of my pages use POST, but I was just going from index.php to create_account.php (via page header) to log_in.php (via page header) to reset_password.php back to log_in.php when I got the error.


    Debbie
    Debbie, did you manually set a $_POST variable when you were developing and forgot to remove it, so even if you do navigate via the address bar you would still end-up posting a value?

    Steve
    ictus==""

  7. #7
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,764
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ServerStorm View Post
    Debbie, did you manually set a $_POST variable when you were developing and forgot to remove it, so even if you do navigate via the address bar you would still end-up posting a value?

    Steve
    Not sure if I follow you?

    (Maybe this would be easier to help me with once I have my Release #2 post up on the web so you can do testing yourself in your own browser?!)

    Here is how my Forms are typically coded...
    PHP Code:
        // *************************************************************
        // HANDLE FORM.                                                                                                 *
        // *************************************************************
        
    if ($_SERVER['REQUEST_METHOD']=='POST'){
            
    // Form was Submitted (Post).

            // Initialize Errors Array.
            
    $errors = array();

            
    // Trim all form data.
            
    $trimmed array_map('trim'$_POST);


            
    // ************************
            // Validate Form Data.        *
            // ************************

            // Check Email.
            
    if (empty($trimmed['email'])){
                
    // No Email.
                
    $errors['email'] = 'Enter your E-mail address.';
            }else{
                
    // Email Exists.
                
    $email $trimmed['email'];
            }

            
    // Check Password.
            
    if (empty($trimmed['pass'])){
                
    // No Password.
                
    $errors['pass'] = 'Enter your Password.';
            }else{
                
    // Password Exists.
                
    $pass $trimmed['pass'];
            } 

    Debbie


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
  •