Re: [css-fonts] font prefetch hints

Regarding the opt-in for preloading purposes, I believe (but have not
proved yet) that it may not be necessary, and that CSS based resources can
be preloaded without it, at least for the majority of cases.

The HTML preloader can keep track of tag names, IDs and class names it
encounters (and whether they contained text). A CSS preloader can then scan
CSS tokens, find resources, and assuming they have a simple selector, see
if they should be downloaded and if so, kick off that download.

The tricky parts would be:
* CSS rules that get overridden further down the line.  I need to gather
data about how often that happens, since that may trigger needless
downloads.
* Complex selectors that trigger resource download - Keeping track of
complex relationships won't be feasible, so such resources won't be
preloaded. Again, need data.
* Unicode ranges for text - They would be harder to track. Maybe we can
flag tokens with popular ranges, but it's trickier.

If anyone has data regarding the frequency in which the first two points
appear in the wild, I'd be very interested to hear it.

Received on Tuesday, 11 November 2014 23:21:01 UTC