3 ms·
Why not modify the CSS syntax? For example, what now is src: url("path/my.otf") format("opentype"); can become src: url("path/my.otf") format("openty
by mschuster91 10y ago
Why not modify the CSS syntax? For example, what now is
src: url("path/my.otf") format("opentype");
can become
src: url("path/my.otf") format("opentype");
src: url-hash("path/my.otf", "md5:86fb269d190d2c85f6e0468ceca42a20") format("opentype");
This way, due to the double declaration, older browsers can opt to download the file as usual while a modern browser detects the hash and can look up the file from its cache. Note I chose md5 here as an example, it may very well be possible to use any hashing scheme here.
- dchest 10y agoObligatory: https://hillbrad.github.io/sri-addressable-caching/sri-addressable-caching.html https://hillbrad.github.io/sri-addressable-caching/sri-addre... (List of problems you need to solve to introduce hash-addressable caching to Web)
- angry-hacker 10y agoWhat if major operating systems would include the popular fonts on Google library with update(s)?
- dchest 10y agoThen you can use them: src: local('Font Name'),
- mschuster91 10y agoPlease not. People e.g. download questionable fonts from the net, which e.g. have been stripped of everything non-alphanumeric, and then complain to you "your website looks bad", or they have official, but fossilized versions of fonts... I always strip local-sources when embedding webfonts for this reason.
- IncRnd 10y agoYou're eventually going to run into trouble attempting to use md5 at a government website. FIPS 140-2 (and soon 140-3) is a standard that stops the use of that particular piece of crufty, broken cryptography.