Results 1 to 2 of 2
  1. #1

    mod_expires not working with IE?

    I have mod_expires and mod_headers setup on one of my servers, I have the directives in httpd.conf (apache on linux):

    LoadModule headers_module libexec/mod_headers.so
    LoadModule expires_module libexec/mod_expires.so
    AddModule mod_expires.c
    AddModule mod_headers.c

    So the module should be loading up. I have in an htaccess file:

    # Cache images
    ExpiresActive On
    ExpiresByType image/gif "now plus 1 day"
    ExpiresByType image/jpeg "now plus 1 day"
    ExpiresByType image/png "now plus 1 day"
    ExpiresByType image/jpg "now plus 1 day"
    ExpiresDefault "now plus 1 day"
    <Files *>
    Header append Cache-Control "public, must-revalidate"
    </Files>

    So I go test it in Firebird/Mozilla/Opera, it appears to be working:
    No porn at this exact url, just the smut-site.com 'logo'
    http://smut-site.com/expire/index.html

    To be sure, I run a head command from bash:
    # HEAD http://smut-site.com/expire/
    200 OK
    Cache-Control: public, must-revalidate, max-age=86400
    Connection: close
    Date: Wed, 03 Dec 2003 19:39:20 GMT
    Accept-Ranges: bytes
    ETag: "3d81dc-93-3fcd2769"
    Server: Apache/1.3.29 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.2 FrontPage/5.0.2.2634 mod_ssl/2.8.16 OpenSSL/0.9.6b PHP-CGI/0.1b
    Content-Length: 147
    Content-Type: text/html
    Expires: Thu, 04 Dec 2003 19:39:20 GMT
    Last-Modified: Tue, 02 Dec 2003 23:59:37 GMT
    Client-Date: Wed, 03 Dec 2003 19:39:18 GMT
    Client-Response-Num: 1

    Yup, appears to be working. Let me make sure the image is cached as well.

    clipped:
    Expires: Thu, 04 Dec 2003 19:40:02 GMT
    Last-Modified: Tue, 02 Dec 2003 22:05:00 GMT

    Yup, that works.

    Testing it in IE, it isn't caching the images. Any reason why? What am I missing here.

    Thanks in advance for any help.

  2. #2
    Join Date
    Oct 2002
    Location
    Canada, QC, Montreal
    Posts
    302
    mod_gzip is sending the "Vary: Accept-Encoding" header

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •