By mlnospam on
Hello,
I've got a a special page with a webcam picture on it and this picture gets actualised every 5 minutes via FTP directly on the server. Now I would like disable browser caching for this single page. I know that for this I need to use the following HTML META tags:
but now my question is how do I get these into my specific webcam node page ?
Regards
Comments
put into your page tpl a
put into your page tpl a loop.
http://drupal.org/node/115419
based on whatever matched your node
I use headers and not meta tags for non-cacheing
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
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");
}
Great, thanks for your help,
Great, thanks for your help, it works really fine. So maybe for the others (who like to copy/paste code) :) here is what I added to my page.tpl.php (at the very top of this file):
This code says that my node with ID 17 will get the special headers set to disable caching of this page...
Thanks
I was also looking for something like this for my webcam page.
For simplicity, I just put
at the top of my page.tpl.php page so (hopefully) nothing would be cached by the browser. Then, I cleared my cache, visited my site and then reviewed what was in Firefox's cache (via about:cache in the address bar) and there are all my webcam image there cached.
Did I do something wrong, or are these the intended results?
cache-control and page.tpl: same problem here
First I tried to put the code mentioned above at the very top of page.tpl.php with no avail.
In a second try the code was placed just after the "print $head" line. No avail either:
when checking the code of the generated page I see that there is no line containing the text "cache-control".
I an other try the lines
were placed in the block (s. above). In that case these two line appear. Bit it looks that the page is NOT generated for each browser call (anonymous user).