Can PHP be set to never cache a response, and always send something fresh to the page? -


i have webpage pulls in xml news feed , don't want page cache xml feed displayed recent.

i tried cache reset every 1800 seconds:

$header[] = "cache-control: max-age=1800"; 

didn't seem work.

so try make webpage auto refresh xml in php?

try this,

<?php header("cache-control: no-cache, must-revalidate"); // http/1.1 header("expires: sat, 26 jul 1997 05:00:00 gmt"); // date in past ?> 

this prevent page being cached on user's machine.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -