[Solved] How do I set up expire headers for images. js, and css?

azn_romeo_4u

Well-Known Member
#1
I have this is in the LST control panel under General > Expire Settings

Enable Expires: Yes
Expires Default: Blank
Expires By Type: image/*=A604800, text/css=A604800, application/x-javascript=A604800

When I use Yslow to check, it doesn't say that its expiring.
 

webizen

Well-Known Member
#2
Are you using LiteSpeed with hosting control panel(like cPanel/WHM)? or configure everything(including server/vhosts, etc) in native LiteSpeed admin console?
 

azn_romeo_4u

Well-Known Member
#3
Using Cpanel/WHM and I have access to root server. But yea i'm not very familar with everything.

I'm trying to set the images/css/js to expire in 30 days.
 

webizen

Well-Known Member
#4
mod_expires for Apache needs to be configured/enabled in cPanel/WHM: since LSWS reads configuration from Apache (set by cPanel), mod_expires needs to be enabled in order for LSWS expires to work (http://www.litespeedtech.com/support/forum/showthread.php?t=4362).

In lsws native configuration (not come from apache's httpd.conf), Expires header is enabled by default as you posted earlier:
General > Expire Settings

Enable Expires: Yes
Expires Default: Blank
Expires By Type: image/*=A604800, text/css=A604800, application/x-javascript=A604800
 
Top