By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,043 Members | 1,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,043 IT Pros & Developers. It's quick & easy.

testing php scripts

P: 1
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
Mar 9 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 6,050
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.
Mar 9 '10 #2

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

Expand|Select|Wrap|Line Numbers
  1. if( !isset( $_GET["screw_cache"] ) || ( $_GET["screw_cache"] != time( ) ) )
  2. {
  3.     header( "Location: index.php?screw_cache=" . time( ) );
  4.     exit;
  5. }
Code is untested.
Mar 9 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.