Re: A summary of key points on dynamically generated web pages

Hi, Nir

Your point is valid if the page is static.  However, I'm looking at situations
like search engine results, web pages presented in a portal customized for
each of thousands of users, web pages listing contents of shopping carts, etc.
It doesn't make sense to cahce these.

Scott


> One problem with dynamically generated pages is that one has 
> to configure the server to send the appropriate last-modified 
> response header to allow caching.
> 
> In addition, the server would like documents to be cached only 
> if it can assure that the cached document that is served to 
> the user is the appropiate variant.
> 
> The simplest way to solve this problem is to have 
> prewritten "static" versions on the server, with different URLs, 
> and the server may use redirects (using a response with 302 
> status code) based on content negotiation. (Content negotiation 
> includes user-agent request header). 
> 
> Having each variant with a different URL makes the documents that the users 
> receive non-negotiated documents that can be cached, and using static files 
> makes the last-modified header a trivial matter: usually the server will 
> use the operating system's information about the file in question.
> 
> However even with this solution you get less caching than with serving 
> one document with one URL.
> 
> So I would recommend to 
> 1. attempt to reduce the number of variants to a minimum. (using diffeent 
>  style sheets per different media and following WAI guidelines)
> 2. If more than one variant is served, have them with different URLs 
>  and make sure the appropriate last-modified header is sent.
> 
> What is this "mimimum" in article 1 above if a function of what 
> clients can actually do. (support to which style sheet languages, what level, 
> bugs etc.)
> 
> Clearly, all this matters only if the document is "otherwise static".
> In case of serving pages based on user input that can not 
> be repeated by other users, caching is irrelevant anyway.

Received on Monday, 22 November 1999 23:00:28 UTC