Jump to content

[SOLVED] Is this PHP code ok ? - Cahce


zc1

Recommended Posts

Hi,

 

I think my site is having a cache problem as on a refresh it different as I log the number of visitors, so I did a google and found the below code.

 

My question is, is this code ok, by this I mean will it affect search engines, rankings etc...

 

<?
//Set no caching
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
header("Cache-Control: no-store, no-cache, must-revalidate"); 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

 

Regards,

Garry

Link to comment
https://forums.phpfreaks.com/topic/53144-solved-is-this-php-code-ok-cahce/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.