testing php scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mab1
    New Member
    • Mar 2010
    • 1

    testing php scripts

    I am sure this is a stupid question but when I update a php script and test in the browser it loads the old version never the updated. I have to change the file name or exit the browser. Can anyone tell me how to simply "browse" the new php version.
    Many thanks
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Hey there. Trying doing a full-refresh, i.e., refresh your page without loading the browser's cache. This is typically done via CTRL+F5 (Windows). However, you'll need to verify it for your OS/browser.

    Comment

    • philipwayne
      New Member
      • Mar 2010
      • 50

      #3
      As above poster said, you could also send some headers to prevent cache with PHP. Or:

      Code:
      if( !isset( $_GET["screw_cache"] ) || ( $_GET["screw_cache"] != time( ) ) )
      {
      	header( "Location: index.php?screw_cache=" . time( ) );
      	exit;
      }
      Code is untested.

      Comment

      Working...