Expires By Type For Fonts Not Working

#1
Hi,
I want to configure the default cache of some content types directly from the server, including js, all images and all types of fonts.

I try configuration like apache from Expires Settings (Litespeed Admin) but cache not working:
HTML:
image/*=A604800, application/vnd.ms-fontobject=A2592000, application/x-font-ttf=A2592000, application/x-font-opentype=A2592000, application/x-font-woff=A2592000

Original from apache:
HTML:
## Add correct content-type for fonts

AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg

## Compress compressible fonts

AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype image/svg+xml

ExpiresActive on

## Add a far future Expires header for fonts

ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"


I say thank you very much for all help :)
 

mistwang

LiteSpeed Staff
#3
You can try adding those MIME type to the default server level MIME setting.
It does not work may due to a missing MIME type definition.
 
#4
You can try adding those MIME type to the default server level MIME setting.
It does not work may due to a missing MIME type definition.
Add to $SERVER_ROOT/conf/mime.properties right?

As this is acceptable? https://s14.postimg.org/rtxki5pip/sp.domain.com_Server_General_Settings_Lite_Spe.png

application/vnd.ms-fontobject .eot
application/x-font-ttf .ttf
application/x-font-opentype .otf
application/x-font-woff .woff
Please provide feedback for all types of fonts can be cached by the server without configuration of .htaccess.
 

Pong

Administrator
Staff member
#6
Add to $SERVER_ROOT/conf/mime.properties right?
yes, correct. Most of the types should be included in default setting already.
After MIME definition defined, and Expires Settings set, Are they working fine without .htaccess?
 
Top