• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • 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?
1 Solution
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">

in your HTML header.
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">
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.

Hi, you can use headers..

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

submissiontechnologyAuthor Commented:
Thanks guys :) your all stars
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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