4 ms·
Can't you preload fonts by base64 encoding them and embedding them in CSS? Ref: http://sosweetcreative.com/2613/font-face-and-base64-data-uri http://sosweetcre
by errantmind 11y ago
Can't you preload fonts by base64 encoding them and embedding them in CSS?
Ref: http://sosweetcreative.com/2613/font-face-and-base64-data-uri http://sosweetcreative.com/2613/font-face-and-base64-data-ur...
- bramstein 11y agoYou can, but then you're limited to a single font format and you would not gain any benefits from the browsers' ability to download in parallel. A lot of this will improve when HTTP/2 becomes more common (you can push resource to the browser and parallel downloads will become more efficient).
- mcgoooo 11y agoI use this technique to great effect, and i would recommend this. Woff i very well supported generally, and then i put a backup to the actual file for the lagging browsers. http://caniuse.com/#search=woff http://caniuse.com/#search=woff
- beebs93 11y agoThis. Though, depending on the font (and how many), its glyphs, etc. you can get pretty bloated CSS files so while you do load the fonts earlier, you could be waiting just as long in the end. I sometimes put them on a CDN to help alleviate some of the potential delay to download and/or render.
- sp332 11y agoSure, but this keeps the documents separate or even on a different server, like FontAwesome or Google.