[whatwg] Proposal: add attributes etags & last-modified to <link> element.

Gavin Peters (蓋文彼德斯) gavinp at chromium.org
Mon Sep 20 06:00:18 PDT 2010


On 20 September 2010 01:40, Roger Hågensen <rescator at emsai.net> 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.


> I like the idea though as it'll allow a page to tell the browser that "Oh
> BTW! If you happen to have this link cached, it was last updated on ......
> You might wanna re-check that if you got a older copy, despite what the
> cache copy's expire is."
>

These extra attributes hopefully allow both kinds of validation; both "still
valid despite being apparently invalid" and "now invalid, despite being
apparently valid."  In the first case it functions as a performance
optimisation (a conditional-GET request that would result in a 304 is
saved), and in the second case it actually prevents a page from rendering
using an old resource (that it would not have validated).


> Some thought need to be given to this though. This will only be same domain
> right? If not then it could be partly used for a DoS. (if a popular site is
> compromised and changed to link to a ridiculous amount files on other sites
> it could get nasty right?)
>

I'm not sure I understand what you're saying, but my first reading suggests
that this isn't a problem.  These proposed attributes will only cause extra
network requests in one case, that of a <link> to a cached resource which is
still valid, but the <link> contains etags/last-modified which suggests it
needs to be validated.  Isn't this incredibly minor compared to all the
other ways a resource can reference & include other pages?

- Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100920/7884bb42/attachment-0002.htm>


More information about the whatwg mailing list