I did some research on speeding up your php mysql site. We update new information on our site every 12 to 24 hours.
I found that Header Expire Cache Control in the browser helps speed up the site.
Here is my code:
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpStr);
I am wondering, how do I change this to 1 hour instead of 3 days, also —
How are my ads on our site getting effected with browser cache enabled? Does it still count impressions and clicks?
Change $offset to:
Generally ads are served off different servers and the requests for the ad content will have their own expiry headers. So whatever you change the cache settings to on your server’s content won’t affect the content loaded from the external ad servers.