• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

caching the site

I'm having some issues, my site is dynamic and the problem I'm having is that the ISP cache my witch does not make it very dynamic.

Is there anyway with php I stop the ISP's caching the site?
0
submissiontechnology
Asked:
submissiontechnology
1 Solution
 
KoorooCommented:
r u sure it's the ISP and not the browser doing caching? as in, you can curl or telnet to the webservice and are unable to pull down revised pages? If it really is your ISP, then you'll have to call them and tell them to stop caching because, when you think about it, if they're serving the page from cache, then it won't hit your web application at all anyways so any changes won't apply. If it's a browser issue, you can use Pragma no-cache.

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

in your HTML header.
0
 
submissiontechnologyAuthor Commented:
Should it be like this?

<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
0
 
PromethylCommented:
Some proxies obey commands like that. Perhaps the fastest way to tell would be to place a date command in your script and set your browser to every visit to the page.

<? echo "This page generated on ".Date("Y/m/d h:i:s "). ' for ' . $_SERVER[HTTP_HOST]; ?>

Something like that.

0
 
gruntarCommented:
Hi, you can use headers..

<?php
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Expires: Mon,26 Jul 1997 05:00:00 GMT");
?>

cheers
0
 
submissiontechnologyAuthor Commented:
Thanks guys :) your all stars
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now