I have a local LAMP stack running on Linux. I have the usual Apache/PHP/mySQL stuff, and everything works fine from localhost.
I have a small app on the server that displays a tree view. This lists a series of documents that are found locally (on the server). These files can be viewed by clicking them in the tree, at which point they are loaded into a DIV on the page. These files may be edited using a simple editor that I have written within the application. This works fine so far.
The problem is that PHP (I assume) is caching these documents as they are loaded, which means that when the user edits them, although they are saved, when they are reselected in the tree, the cached version is shown, and not the newly edited version.
The initial page of the app was a standard HTML page, but I have renamed it to PHP and added the following code to the top of this page:
<?php
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");
?>
Unfortunately, while this seems to prevent the main page from being cached, it does not prevent those files that are loaded dynamical during the general use of the application.
Is there any way that I can prevent PHP (Still assuming that it is PHP) from caching these dynamically loaded, local files?