How to set Expire Headers for images in Litespeed

#1
I need help with setting up expire headers for images. I have the following settings in the LSWS Admin Console.

Code:
Enable Expires	Yes
Expires Default	Not Set
Expires By Type	image/*=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800
I checked through google's pagespeed tool in firefox and it says (expiration not specified) for all the images.

I have also tried to specify image type but still the same result.

Code:
Enable Expires	Yes
Expires Default	Not Set
Expires By Type	image/gif=A604800, image/png=A604800, image/jpg=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800
Can somebody please point what I need to do in addition to above steps.
 

NiteWave

Administrator
#2
if a image file is streamed by php, php should set the Expire header;

if it's static image file and served by lsws, should have the expire header.

you can check litespeedtech.com 's image header in pagespeed, can see expire header is there.
 
#3
if a image file is streamed by php, php should set the Expire header;

if it's static image file and served by lsws, should have the expire header.

you can check litespeedtech.com 's image header in pagespeed, can see expire header is there.

Sorry I missed you. I'm not good at it but I'm learning fast :) I'm using wordpress and have configured a subdomain for the media. Now the images (which do not have expire headers) are being served from the subdomain, does that still count as streaming through php ?

Please advise.
 
#6
I checked through google's pagespeed tool in firefox and it says (expiration not specified) for all the images.

I have also tried to specify image type but still the same result.
phe90xis.
create or modify your .htaccess file and add this line
ExpiresActive On

This was a quick fix suggested by Nitewave.

I am working on fixing expire headers, cookie less domain and other pagespeed and yslow instructions. I will post my findings and fixes in a couple of days here.
 
Top