Blog »

New font server feature: webfont aggregation via base64 encoding

December 15, 2017, at 03:30 PM by Obormot in Features, Updates (0 comments)

Today brings a new performance-improving feature, for anyone who uses webfonts on their wiki via my font server.

Some background: bandwidth is cheap these days. But latency, especially with multiple HTTP requests, is still problematic. If you use three webfonts (one for code, one for headings, one for text), and then you have some italics in your text, and some bold… now you’re looking at five, six, seven requests, just for webfonts (plus the CSS file itself). Caching is good (the client need only download each font file once), but reducing the number of requests is even better—even if it means the client must download a single big file (which, of course, will also be cached).

That’s where webfont aggregation comes in. It’ll stuff all of the font data into the CSS file itself (via base64 encoding). Visitors to your wiki will only have to download one file, that will contain the CSS for the webfonts you’re using, and the font data itself. Of course, if you use many fonts, that’ll be a hefty file (the one for this wiki is 1.7 MB)… but that’s often better than requiring people to download many smaller files. (And, again, that file need only be downloaded once, as it’ll be cached by the user’s browser.)

How to activate webfont aggregation

See instructions here.

Leave a reply
Your name (required):

Your comment (required):


Enter value: Captcha