Forum Moderators: open

Message Too Old, No Replies

Autorefreshing/no caching pages and Google

Can you put in html headers and not affect Google caching

         

t2dman

11:55 pm on Mar 18, 2003 (gmt 0)

10+ Year Member



I need to make sure that users get fresh copies of pages. Is there anything in the following script that would cause Google or other search engines to not cache their copy of my pages:

$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: 0'); // rfc2616 - Section 14.21
header('Last-Modified: ' . $now);
header('Cache-Control: pre-check=0, post-check=0, max-age=0,no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
header ("Expired: CONTENT=-1");

Brett_Tabke

7:38 am on Mar 19, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



No. Perfectly legitimate.

However, I would also be sure to add the Google NOARCHIVE meta tag to all your html.