Keep server from Caching

Im trying to keep my isp from cacheing my site so I found this code

<?php header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); ?>

but I use joomla so I figured I would put that in the templates index.php but where at ? like what line ? My site is 911compressors.com I would love to study Php but dont know where to start I have read alot but just cant find what im looking for any help is appreciated Thanks guys and gals

Items using the HEADER function must come before ANY html is sent. That includes the tag itself.

Those things should be the very first of the pages.

I would be careful about header(‘Expires: Mon, 26 Jul 1997 05:00:00 GMT’); about setting the time too far in the past. Since you are using PHP, you can use a time perhaps 24 hours ago. Having a date to far back may be seen by some as a potential hack (particularly from scammers) and may cause a problem.

Hope this helps.

Sponsor our Newsletter | Privacy Policy | Terms of Service