To configure caching, go to "Files → File Manager"

file

Go to "public_html" folder.

file

By default, the ".htaccess" file is hidden

To fix this, click on "Settings " and check "Show hidden files (dotfiles)".

file

Next, select our .htaccess and click "Edit"

file

In the window that will appear let's click "Disable encoding check " and click "Edit".

file

Let's specify the following values at the beginning of the file:

<IfModule mod_expires.c>  

ExpiresActive On  

ExpiresByType application/javascript "access plus 10 days"  

ExpiresByType text/javascript "access plus 10 days"  

ExpiresByType text/css "access plus 10 days"  

ExpiresByType image/gif "access plus 10 days"  

ExpiresByType image/jpeg "access plus 10 days"  

ExpiresByType image/png "access plus 10 days"  

</IfModule>  

Then you can click the "Save changes" button.

file

In this code, the caching term specified is "access plus". We can set a longer term for a month or even a year if we want.

If, on the contrary, we need to disable caching of some files, then simply don't add them to the list. Let's write the following code in file ".htaccess", correcting our own actual changes.

<FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">  

Header unset Cache-Control  

</FilesMatch>  

Info

If you have any difficulties or need help, please create a support request via ticket system and we will be happy to help you.

Updated July 9, 2024