• [solved] Webpage has expired issue#

  • inga_thorn Reply #1, 2 years, 5 months ago

    Reply
    In IE7, if I click a result in the results page, let that page load and then click the browser's back button to return to the list of results then I get the following message:

    Webpage has expired

    Most likely cause: The local copy of this webpage is out of date, and the website requires that you download it again.
    What you can try: Click on the Refresh button on the toolbar to reload the page. After refreshing, you might need to navigate to the specific webpage again, or re-enter information.


    Does anyone know how can I avoid this?



  • inga_thorn Reply #2, 2 years, 5 months ago

    Reply
    I've managed to find a fix for this which I hope might be of use to someone else.

    I added a snippet to the top of the Template for the search results which adds this:

    <?
    header( 'Cache-Control: private, max-age=10800, pre-check=10800' );
    ?>

    Seems to work for me.


  • pgudge Reply #3, 2 years, 3 months ago

    Reply
    Thanks for that, fixed for me too (IE.


  • nods_dorf Reply #4, 2 years, 1 month ago

    Reply
    Brilliant!

    Fixed my issue.

    <?php
    header( 'Cache-Control: private, max-age=10800, pre-check=10800' );
    ?>


  • twz-17 Reply #5, 1 year ago

    Reply
    More thanks for this solution.

    The same error was reported by one of my users today. Strange that the site has been live for 2 years, but it hasn't been reported before. No changes to MODx that would affect this, but maybe something PHP/Apache was changed on the server?

    I put the code into a MODx snippet, so it only sets the Cache-Control header for the search page.