What is the best approach for caching a small site like a blog updated weekly?
Presently I have in Global Configuration:
System Cache: ON - Conservative caching
Cache handler: File
Platform-specific caching: No
Cache time: 30 min
Path to cache folder: [BLANK]
Additionally, I have the following code in .htaccess file:
Code: Select all
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 week"
# Images
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
...
...
</IfModule>
Surprisingly https://pagespeed.web.dev is complaining:
The problem was mostly in CSS files. PageSpeeds wants CSS to be cached for more than 2 months, though JS could be only month cached. Strange.Serve static assets with an efficient cache policy --- 13 resources found
Presently mine:
Code: Select all
ExpiresByType text/css "access plus 6 month"
What do you think about all that? Is it OK .htaccess to include ExpiresByType directives when Caching is ON in Global Configuration? Or are they different things?