[whatwg] <a onlyreplace>

On Fri, Oct 16, 2009 at 4:43 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
[snip]
> Isn't if inefficient to request the whole page and then throw most of
> it out? ?With proper AJAX you can just request the bits you want.
> ======================================================
> This is a valid complaint, but one which I don't think is much of a
> problem for several reasons.
[snip]
> 3. Because this is a declarative mechanism (specifying WHAT you want,
> not HOW to get it), it has great potential for transparent
> optimizations behind the scenes.
[snip]

Yes? A HTTP request header that gives the only-replace IDs requested,
and the server is free to pare the page down to that (or not). I hit
reply to point out this possibility but then saw you already basically
thought of it,  but a query parameter is not a good method: it'll
break bookmarking ... and preserving bookmarking is one of the most
attractive aspects of this proposal.

[snip]
> What about document.write()? ?What if the important fragment of the
> page is produced by document.write()?
> ====================================================
> Then you're screwed. ?document.write()s contained in <script> blocks
> inside the target fragment will run when they get inserted into the
> page, but document.write()s outside of that won't. ?Producing the
> target fragment with document.write() is a no-go from the start.
> Don't do that anyway; it's a bad idea.

I'm guessing that the rare case where you need to write into a
replaced ID you can simply have a JS hook that fires on the load and
fixes up the replaced sections as needed.

Received on Saturday, 17 October 2009 01:53:05 UTC