Inconsistent Expires and Last Modified HTTP response headers

I’ve been looking into caching behavior somewhat and started looking at the response headers from the sites that I manage. I noticed something a bit odd that I think is probably a bug.

The Expires and Last-Modified response headers are not consistent between requests for various types of design elements, and in some cases returns bogus values.

Given the power of effective caching on site performance, this would be a really good place to give developers a bit more control, or at least accurate behavior.

Using the following URL, you can see the headers generated for the different elements on the page. Note that the server claims to be IIS because IIS is passing the request to Domino:

http://www.ircache.net/cgi-bin/cacheability.py?query=http%3A%2F%2Fwww.highlandhomes.com&descend=on

The following 2 items are stored as File Resources - no Expires header is sent, but the correct last-modified header gets sent (it is the actual last modified date of the design element):

http://www.highlandhomes.com/website.nsf/HI/awmmenupath.gif

http://www.highlandhomes.com/website.nsf/HI/navbar.js

This item is stored as a page with type text/css, but for some reason gets no Expires or Last-Modified header, which baffles me, because the other .css items are stored the same way, but do get these headers generated (same design element type, same character set, etc.).

http://www.highlandhomes.com/website.nsf/HI/Master.css

All the other items referenced on that page are either stored as JS Script Libraries (.js), Pages (.css) or Image Resources (.jpg, .gif). All (previous example excepted) are served with a Last-Modified time equal to the time of the request, and an Expires value of Tue, 01 Jan 1980 06:00:00 GMT (basically time 0 since I’m in -6:00 timezone). Neither value is correct, and they prevents these items from being intelligently cached.

I’ve looked into creating an HTTP response header rule to maybe override the last-modified time, but I could only set a literal time value, not the true last-modified time.

Also, in many cases @formulas can’t be used to set the headers because the item requested is an image, or other non-programmable thing.

Subject: Inconsistent Expires and Last Modified HTTP response headers

You could use the DSAPI to change the response headers. Read more at:Redirect Notice

Are you sure that the IIS isn’t the problem? Have you tried making the same request to Domino’s HTTP stack instead?

  • Johan

johan@kanngard.net

http://dev.kanngard.net

Subject: Inconsistent Expires and Last Modified HTTP response headers

I have found this to be the case as well and we are running Domino on an AS/400. There doesn’t appear to be consistency for some types of design elements. Others are very consistent - they have no expire header no matter what server setting you configure. Case in point: All image resource never have an expire header.