.woff issues


From the GTmetrix test, it appears that the .woff (and .woff2) file type is not specified in the cache policy, although I have the following in the .htaccess fragment:

Apache config:
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A31557600
ExpiresByType image/x-icon A31557600
ExpiresByType image/vnd.microsoft.icon A31557600
ExpiresByType image/svg+xml A31557600

ExpiresByType image/jpg A31557600
ExpiresByType image/jpeg A31557600
ExpiresByType image/png A31557600
ExpiresByType image/gif A31557600
ExpiresByType image/webp A31557600

ExpiresByType video/ogg A31557600
ExpiresByType audio/ogg A31557600
ExpiresByType video/mp4 A31557600
ExpiresByType video/webm A31557600

ExpiresByType text/css A31557600
ExpiresByType text/javascript A31557600
ExpiresByType application/javascript A31557600
ExpiresByType application/x-javascript A31557600

ExpiresByType application/x-font-ttf A31557600
ExpiresByType application/x-font-woff A31557600
ExpiresByType application/font-woff A31557600
ExpiresByType application/font-woff2 A31557600
ExpiresByType application/vnd.ms-fontobject A31557600
ExpiresByType font/ttf A31557600
ExpiresByType font/otf A31557600
ExpiresByType font/woff A31557600
ExpiresByType font/woff2 A31557600

### marker BROWSER CACHE end ###

## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
To note, the font is served locally with:

@font-face {
font-family: 'Montserrat-Regular';
src: url('https://yoururl/fonts/Montserrat-Regular.woff2') format('woff2');
url('https://yoururl/fonts/Montserrat-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
@font-face {
font-family: 'Montserrat-Bold';
src: url('https://yoururl/fonts/Montserrat-Bold.woff2') format('woff2');
url('https://yoururl/fonts/Montserrat-Bold.woff') format('woff');
font-weight: normal;
font-style: normal;
@font-face {
font-family: 'Montserrat-Italic';
src: url('https://yoururl/fonts/Montserrat-Italic.woff2') format('woff2');
src: url('https://yoururl/fonts/Montserrat-Italic.woff') format('woff');
font-weight: normal;
font-style: normal;
How to fix it?


For openlitespeed, the browser cache is controlled by the server, please go to openlitespeed web console > Server Configuration > General > Expires Settings and add type from there.
Sorry, but is there any explanation for that, because LS Enterprise also has the same settings in its console, so I'm confused by the answer that says not to use the settings in the console, but directly to the .htaccess file?

P.S. - I'm just curious.
I'm sorry that my question was obviously not clearly worded. I know that LS Enterprise supports all rules in the .htaccess file.

My question was:

- Why should it be added in the .htaccess file, when LS Enterprise has an expiration field in its web console (just like OpenLiteSpeed has such an identical field)?

Finally, if I understand correctly, OpenLiteSpeed supports expiration rules only by entering them through the web console, while LS Enterprise supports them through the .htaccess file, but also through the web console. Did I understand correctly?


For LSWS, the expiration value in the .htaccess file has higher permission than the web console. The expiration field in the web console will be applied if there's no expiration value in the .htaccess. Hope it's clear now.