1. Christian Brandlehner02/25/2005 16:03:15
Homepage: http://chris.brandlehner.at
Update: The next release of BlogSphere will not need HTTP Response Header configuration in the Domino Directory for the JavaScript files as we added expiraction tagging in the application.
If you want to do that in your own applications too, add a computed text on the form with the following formula, which will set expiration date to tomorrow:
@SetHTTPHeader("Expires";@Adjust(@Now([ServerTime]);0;0;1;0;0;0));""
2. Markus Koller04/07/2005 13:03:36
Firefox and Live HTTP Headers show that for example comments.js is not being cached. Any ideas why? Content-Length should be zero...
http://chris.brandlehner.at/Brandlehner/cab_blog.nsf/comments.js
GET /Brandlehner/cab_blog.nsf/comments.js HTTP/1.1
Host: chris.brandlehner.at
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://chris.brandlehner.at/Brandlehner/cab_blog.nsf/d6plinks/CBRR-69WKNV
If-Modified-Since: Thu, 07 Apr 2005 10:53:40 GMT
Cache-Control: max-age=0
HTTP/1.x 200 OK
Server: Lotus-Domino
Date: Thu, 07 Apr 2005 11:00:43 GMT
Last-Modified: Thu, 07 Apr 2005 11:00:42 GMT
Content-Type: text/javascript
Content-Length: 8896
Expires: Fri, 08 Apr 2005 11:00:42 GMT
Content-Language: en
3. Christian Brandlehner04/07/2005 13:36:23
Homepage: http://chris.brandlehner.at
I have configured comments.js to be cached for 24 hours. Therefore the HTTP-Response is:
Expires: Fri, 08 Apr 2005 11:00:42 GMT
The caching is up to your browser, I would expect your clients is not reloading comments.js until "Fri, 08 Apr 2005 11:00:42 GMT".
In the example given, this has to be the very first request as you are receiving HTTP response code "200", not "302".
4. Markus Koller04/07/2005 13:48:55
It looks like the page always gets a Last-Modified of "now". I never got a 304 response.
I suspect the <Computed Values> in the Notes page are responsible for this. If I delete ALL computed values, the response includes an ETAG and the browser gets 304 the next time.
With computed values on a page, IMHO it will never cache:
GET /Brandlehner/cab_blog.nsf/comments.js HTTP/1.1
If-Modified-Since: Thu, 07 Apr 2005 11:42:40 GMT
HTTP/1.x 200 OK
Date: Thu, 07 Apr 2005 11:43:24 GMT
Last-Modified: Thu, 07 Apr 2005 11:43:23 GMT
Content-Length: 8896
Expires: Fri, 08 Apr 2005 11:43:23 GMT
5. Christian Brandlehner04/08/2005 23:24:01
Homepage: http://chris.brandlehner.at
Good point. I will investigate this behaviour as I think the "Last-Modified" timestamp should NOT affect caching as I want the browser not to check for status 302 but to use the file from the cache without revalidation.
6. Dwight Wilbanks01/03/2006 06:44:20
Homepage: http://www.dwightwilbanks.org
You rock! Thanks, worked like a charm. I've now got a whole list of other uses for these rule docs. With my least aggresive caching it dropped my "New Blog Entry" time from 7-8 seconds down to 4-5 tenths of a second. With agressive caching I was getting 2 tenths of a second load times, but, I really don't mind waiting the extra 2-3 tenths of a second to have cache refreshed every visit.
7. Torch06/21/2006 19:29:39
Sir,
I have been messing around with the Studio Blog / RSS reader off Openntf and seem to be having similar problems to those you experienced. I was wondering if you had managed to overcome them? It seems the project has died and the Project Manager no longer responds to mail.
It may not be the all singing all dancing app it was envisioned to be, but if the basic functionality (read, import, expire, and limit channel items) is more or less all I need. failing a fix are there alternatives you can suggest. I'm 3/4 the way through a project for a client and really have not got the time to attempt a new reader from scratch.
Yours
Torch
South Africa
8. Christian Brandlehner06/22/2006 07:43:10
Homepage: http://chris.brandlehner.at
@7: I never got the BlogReader to work but all I did was an "out of the box" attempt, as I did not have the time to dig into it.
9. Morten Sigsgaard02/04/2009 06:52:35
Homepage: http://msigsgaard.dk
I stumbled across this, and just wanted to share an oppinion on dynamic contents, which in most cases is revalidated with no respect of any expiration.
What im working on is the Quickr CMS which runs on domino;
Instead of expiration, ill use the Last-Modified from server. I believe this is the best approach, maybe combined with max-age/mag-stale on client side requests.
There are N documents in db. Which leaves n iterations for computing Last-Modified - so. Even if browser is notified to use its cache, the server has allready done its job..
What i find to be elegible as the prime solution
Must be toggling a NotesDocument, containing the Last-Modified date - refreshed when a new Document arrives.
So N get very small here; in fact equal to one