One thing that has long irritated me is that page icons, unlike backgrounds, stylesheets, or pretty much any other resource that a page may load, do not follow
Cache-Control-family directives like
Expires to get reloaded when they change. Icons, for some reason, are only reloaded if and when their URL changes.
EDIT EDIT EDIT: Apparently this has something to do with icons being overlayed by the history system in Chrome, which just feels like all kinds of mistaken. But at least it’s not a platform-wide mistake.
There’s also the annoyance of having tons and tons of different standards for icons, and, of course, each browser has their own arbitrary selection criteria for which to use, leading to more resolution-specific icons and inexplicably separate new standards like
manifest.json (which still has this render-proliferation problem). What we really need is a simple “downscale whatever
rel="icon" implements a size above what you need, or upscale the largest if there isn’t one” rule, which is capable of handling all of these (letting authors just upload a 2048x2048 icon and call it a day).
On the subject of the “many different renders cascade”, we’re inexplicably supposed to host tons of different-resolution raster renders, for every possible display size of what is most likely the same icon. Past 32x32, there’s only so much hinting that’s realistically going to differentiate the images beyond just being differently-sized downscales of a larger source image - and the number of sizes we need to provide is doubling every year. It’d be more space- and transfer-efficient (both in terms of image size and definition size), not to mention smoother and more future-proof, to just be able to provide the vector source for icons. I could write a polyfill for this, too, but again, there’s no reason this can’t be implemented by the browsers themselves (since there are sufficient code paths to do this in userland).
- Icon caching needs to follow the regular asset pipeline caching model.
- In the presence of links to multiple sizes and definitions matching multiple vendor-specific standards, precedence and selection for icon loading and usage behavior needs to be simplified, specified, standardized, and made polyfillable.
- Browsers need to learn how to use SVG icons. I shouldn’t have to upload a new set of renders to my server every time Apple releases a new iPhone with an all-unprecedented Super Retina 2 Turbo HD Tournament Edition Plus-Size screen resolution.