Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running apche2 and tomcat6 both on port 80 with mod_jk setup on ubuntu servers(8.10,9.10). Tomcat is being used for serving jsp pages. I've a small problem with the IE browser which doesn't cache but just reload all the images(jpg|png|css) when refreshed the page which is not happing with the other browsers. I also tried appending the following in the apache config file but no change.

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/css "access plus 1 month"
    ExpiresByType text/html "access plus 1 month"
 </IfModule>

/etc/apache2/apache2.conf file:

Alias / /var/www/
ErrorDocument 503 /maintenance.html
ErrorDocument 404 /maintenance.html
JkMount / myworker
JkMount /* myworker
JkMount /*.jsp myworker
JkUnMount /*.html myworker


<VirtualHost *:80>
ServerName station1.mydomain.com
DocumentRoot /usr/share/tomcat/webapps/myapps1
        JkMount /* myworker
        JkUnMount /*.html myworker
</VirtualHost>


<VirtualHost *:80>
ServerName station2.mydomain.com
DocumentRoot /usr/share/tomcat/webapps/myapps2
        JkMount /* myworker
    JkMount /*.html myworker
</VirtualHost>

Anybody has any trick to make IE cache and not to reload all the images everytime?

share|improve this question

migrated from stackoverflow.com May 26 '11 at 12:59

This question came from our site for professional and enthusiast programmers.

1 Answer 1

We didn't have much luck getting IE to cache until adding something like this to the apache configuration for files matching images and stylesheet extensions:

Header add Cache-Control "max-age=28800, public"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.