Search code examples
phpcachingjoomlabrowser-cachejoomla1.7

Joomla clear cache for a specific page only


I want to clear cache on a specific page ? I'm using Joomla as my CMS. Whats the override do I have to do? What's the code should I insert into my view?

Thanks


Solution

  • You can't clear the browsers cache using server side commands. You can only prevent things from being cached. Im not sure how you would go about doing it for every single thing on a page, but for an article for example, you could install the PHP Direct plugin then add the following code (untested):

    <?php
      header("Cache-Control: no-cache, must-revalidate");
      header("Expires: Wed, 01 Jan 2020 05:00:00 GMT");
      header("Content-Type: application/xml; charset=utf-8");
    ?>
    

    Don't forget to use the php tags.