Re: Need to: "preload" CSS and JS

On Mon, Dec 20, 2010 at 12:08 AM, Kyle Simpson <getify@gmail.com> wrote:
> I say "suboptimal" because I consider the "cache-preload" tricks to be
> inherently less efficient. Even if we did as you said, and eliminated the
> problem of the 51% of resources without sufficient caching headers by
> substituting page-lifetime caching headers under certain (or all) loading
> cases, we'd still have the fact that there's a non-trivial delay to pull an
> item from cache (ie, disk) as opposed to immediately parsing/executing a
> resource that's been proactively preloaded in memory but had its execution
> deferred.
>
> Some time ago, I benchmarked (informally) the cache-load penalty by
> comparing a script that was loaded via XHR and injected versus a script that
> was loaded into cache and then re-requested. The XHR outperformed the
> load-from-cache. I can't recall exactly the figures, but I think for a
> medium-sized script (~75k) it was about 5% slower or something of that
> order.

This is an implementation detail.  There's no reason browsers couldn't
make sure to cache different things in memory if it were useful to
speed sites up.

On Mon, Dec 20, 2010 at 9:22 AM, Kyle Simpson <getify@gmail.com> wrote:
> Would the spec consider adding wording to this section to codify how IE's
> `readyState` behaves in this circumstance?

The editor doesn't consider spec change requests on public-html, as
far as I know.  If you want a response from him, either file a bug in
Bugzilla or post to the whatwg list.

Received on Monday, 20 December 2010 16:18:47 UTC