Browser caching Collection detail page - Suggestions?

  • Hello,


    I have a collection item/list set up. When I edit the content on a collection item and click a link on the list page to the detail page, the new content doesn't load on the page until I refresh my browser. I thought that this was an issue with the browser caching the content somehow, so I changed the PHP headers to prevent caching on the detail page:

    Code
    1. header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
    2. header("Cache-Control: post-check=0, pre-check=0", false);
    3. header("Pragma: no-cache");

    This solved my issue, but seems like overkill and a larger hit to performance than necessary for such a small fix. Does anyone know a better way to approach this issue without needing to prevent all caching? Server-side or within the PHP file?

  • Gareth S

    Approved the thread.