Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    25
    Thanks
    1
    Thanked 4 Times in 4 Posts

    How to force Refresh?

    I have a unique problem. I basically need to have a certain page reprocess the php when it's accessed by either the forward or back buttons. The current (default) behaviour has it just reload the page from the cache, as normal. This will not work for our purposes - it must reload completely. We need the php & database access on every load of this page, and that's currently not happening.

    I'm totally lost as to how to make this happen. Does anybody have a suggestion for me? Even something to look for would help.

    Thanks in advance.

  • #2
    Regular Coder meth's Avatar
    Join Date
    Jan 2003
    Posts
    262
    Thanks
    0
    Thanked 9 Times in 9 Posts
    Best to prevent caching then.

    <?php
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', FALSE);
    header('Pragma: no-cache');
    ?>
    I do Web Design, Brisbane based.
    More time spent in PHP/MySQL Web Development.
    And Search Engine Optimisation takes up the rest of it.

  • #3
    New Coder
    Join Date
    Aug 2007
    Posts
    25
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Thanks meth. That works perfectly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •