So for the last couple of days (after installing flarum), I'm having very slow loading speed on my website. I'm using Hostinger premium plan and there is no good caching service. I also don't use cloudflare. So I explain the issue to chatgpt and it suggested me to add some caching rule in the htaccess file and here it is:
`<IfModule mod_expires.c>
ExpiresActive On
# Static Images (jpg, jpeg, gif, png, ico) - Cached for 1 year
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
# CSS and JavaScript - Cached for 3 months
ExpiresByType text/css "access plus 3 months"
ExpiresByType application/javascript "access plus 3 months"
# Fonts - Cached for 6 months
ExpiresByType application/x-font-ttf "access plus 6 months"
ExpiresByType application/x-font-woff "access plus 6 months"
ExpiresByType application/x-font-woff2 "access plus 6 months"
ExpiresByType font/opentype "access plus 6 months"
# PDFs and other documents - Cached for 1 month
ExpiresByType application/pdf "access plus 1 month"
# HTML (optional short caching) - Cached for 1 hour
ExpiresByType text/html "access plus 1 hour"
# Default caching for any other file types - Cached for 1 month
ExpiresDefault "access plus 1 month"
</IfModule>
`
I added the code in Htaccess but when i run page speed test, i see no major improvemnet. So my question is, is this code functional? And is there any issue adding it in Htaccess file?