This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

quochuy16611
quochuy16611

Hi,

All my pages are returning the header Cache-Control: no-cache How can I configure this?

Thanks

inetis
inetis

You can modify .htaccess to do it. more info here : https://varvys.com/pagespeed/cache-control.html

here is an example of configuration

<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType text/css "access plus 31536000 seconds"
ExpiresByType text/javascript "access plus 31536000 seconds"
ExpiresByType application/javascript "access plus 31536000 seconds"
ExpiresByType application/x-javascript "access plus 31536000 seconds"
ExpiresByType image/ico "access plus 31536000 seconds"
ExpiresByType image/gif "access plus 31536000 seconds"
ExpiresByType image/jpg "access plus 31536000 seconds"
ExpiresByType image/jpeg "access plus 31536000 seconds"
ExpiresByType image/png "access plus 31536000 seconds"
ExpiresByType image/bmp "access plus 31536000 seconds"
</ifModule>

Last updated

quochuy16611
quochuy16611

Hmmm, not very practical. But thanks

quochuy16611
quochuy16611

Would it be possible to override it via the "Code" tab of a page in the CMS?

quochuy16611
quochuy16611

No worries, I created my own plugin to handle that. Will share later

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.