W3C home > Mailing lists > Public > public-html@w3.org > December 2010

Re: what to do with invalid (or improper) mime-type resources

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Sun, 19 Dec 2010 12:08:48 -0500
Message-ID: <AANLkTi=ZeY6=KxDvm=zzNdLN6RqicD8H_S4qevGwmFy_@mail.gmail.com>
To: Getify <getify@gmail.com>
Cc: public html <public-html@w3.org>
On Sun, Dec 19, 2010 at 9:20 AM, Getify <getify@gmail.com> wrote:
> For performance optimization reasons (both in CSS loading and in JS
> loading), as I said above, I think it's time that the spec consider being
> more specific on this issue.

It really can't be.  Whether the browser decides to cache a particular
resource, and for how long, depends on many factors that cannot be
specified, such as: how much disk space is available, how likely the
browser thinks the resource is to be used again (perhaps based on the
user's browsing patterns), how expensive a cache miss for the resource
would be, etc.  On embedded systems with limited disk space, browsers
might only cache very small resources.  Even on a typical desktop,
browsers might decline to cache excessively large resources.  This is
not something that can be standardized.

Similarly with loading.  Browsers need to be able to make intelligent
decisions on what to load when, including deciding (perhaps based on
bandwidth or other constraints) whether to prefetch things or wait
until they're needed.  A browser that wants to conserve bandwidth --
maybe it knows it's on a per-per-megabyte mobile connection, or it
doesn't want to interfere with other pages loading at the same time --
might legitimately decide not to prefetch something no matter what the
author thinks.

It might be a good idea to have some way for the author to hint to the
UA that they think some resource is likely to be used soon, like the
video/audio preload attribute.  But we cannot require UAs to preload
or cache anything at any particular point.  Preloading and caching are
always tradeoffs, and authors and spec writers don't have enough
information to say that one thing definitely takes priority over
another.

> Leaving the loading/caching behavior (for JS and CSS, specifically)
> undefined is no longer encouraging the browser vendors to compete and
> innovate

Actually, there's significant innovation about loading and caching
right now.  In just the past year or two, browsers have gotten much
smarter about preloading resources, like gaining the ability to load
scripts in parallel.  Someone is working on pipelining for Firefox.
I've also seen people talk about possibly prioritizing scripts and
styles over images in caches, because scripts and styles block page
rendering and images don't.  Browsers have been drastically increasing
their cache sizes.  Etc.
Received on Sunday, 19 December 2010 17:09:41 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:07 UTC