Re: Problem with mode_expires module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One more finding, When caching is enabled for static files, following is the behavior of the apache server : -

For the first request to resource, 
Apache server responds with HTTP status code 200

Log message
127.0.0.1 - - [15/Sep/2010:14:17:33 +0530] "GET /test.html HTTP/1.1" 200 367 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9 GTB7.1"

For all other subsequent request 

Apache server responds with HTTP status code 304

Log Message 
127.0.0.1 - - [15/Sep/2010:14:17:38 +0530] "GET /test.html HTTP/1.1" 304 209 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9 GTB7.1"


That look like okay for me as with status code 304, there is no any payload in the http response, but again, what is the need for this server round-trip, when a resource is cached for the 1 year, it should not be asked for again till the time it is not expired.

Is this right?

Regards,
Vijay Shanker Dubey



On Wed, Sep 15, 2010 at 1:11 PM, Vijay Shanker Dubey <vijay.shad@xxxxxxxxx> wrote:


I am trying to enable cache on my apahce web server. I am using following module for this purpose.

LoadModule expires_module modules/mod_expires.so

I have added following lines in my httpd.conf file to set set the expire settings on the documents.

ExpiresActive On
ExpiresDefault "access plus 1 year"

By documentation, this should enable expiration on all the documents for one years, In response headers returned by web server, there are expire header and also cache control header with max-age attribute, But still when i refresh the page, request goes to server to fetch the file.

I presume these files should be loaded from cache only. Can you point what i might be missing?


Regards,
Vijay Shanker Dubey



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux