- From: Roger Hågensen <rescator@emsai.net>
- Date: Thu, 09 Dec 2010 14:20:55 +0100
On 2010-12-08 20:44, Ian Hickson wrote: > On Mon, 20 Sep 2010, Roger H?gensen wrote: >> It would be better to define this as explicitly indicating which >> resources are NOT valid any longer, with most sites/web applications >> this would only be a select few links. > Doing that would require knowing what the browser's cache contains. Actually it would help the browser to display content faster and with less bandwidth use, as the html document would have last-modified for <link> elements, the browser then just checks if the linked element is cached and if it is, is the last-modified different. While currently the browser would make a last-modifed http header request for the link element. A <link> or <script> with a href is less likely to change than the html contents on the majority of sites, so being able to hint to the browser that this css or that javascript was not changed saves the browser the (multiple) roundtrips to check if the last-modified of the css or js file. So a last-modifed just lets the web author tell the browser cache that the link is stale or not stale. So it's: 1. http header or http get of html, if not cached or stale or cache heuristics thinks that last-modified should be re-checked. 2. do the same with all hrefs, sources etc. in the html document. vs 1. same as 1 above but last-modified hinting of href and src allows the browser to skip step 2 (in well authored or well made template based pages obviously). Damn. I think I skewed this whole topic away from it's original subject to last-modified being supported by all link/href/src etc. in html in general. Which may not be a bad idea really, as a last-modified="timestamp_here" (timestamp is http://www.ietf.org/rfc/rfc2822.txt ) would only be a few bytes vs a http header call or a full http get call and added to that the latency/delay in addition. Shortening last-modified to modified might be something to consider as well. -- Roger "Rescator" H?gensen. Freelancer - http://www.EmSai.net/
Received on Thursday, 9 December 2010 05:20:55 UTC