Is it ok to put Cache-Control at the top of index.php like this:
Code: Select all
<?php
defined('_JEXEC') or die;
header('Cache-Control: max-age=1234567');
?>
Thanks
Moderator: General Support Moderators
Code: Select all
<?php
defined('_JEXEC') or die;
header('Cache-Control: max-age=1234567');
?>
I'm having this same issue, my headers are showing astheigloo22 wrote: ↑Fri May 19, 2023 3:14 amSo now It seems I have another problem, I contacted my hosting service and asked the same question, and they said it will not work until I fix this no-cache header.
$ curl -sI https://www.xxxxx.com/ | grep cache-control
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Does anyone know hot to fix this?
Code: Select all
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-cache, max-age=0, must-revalidate
How can I use PHP's native header functions to remove the header?