4 ms·
I love typography and have no issues with the fonts themselves; font servers are the problem here, making several requests to download not only fonts but also j
by kawera 11y ago
I love typography and have no issues with the fonts themselves; font servers are the problem here, making several requests to download not only fonts but also js scripts. We could easily see Google Fonts as Google Analytics in desguise, same for Adobe. Encoding fonts directly into stylesheets works pretty well.
- radicalbyte 11y agoNot really, the browser caches these files. They're only loaded once. No requests for subsequent usages. I don't see how that helps for spying on visitors? Google must be doing it to improve performance.
- kawera 11y agoSure, I give Google the benefit of the doubt in regard to user data collection on GF. As for caching, mobile phones have very small caches and will reload fonts frequently, specially with the large variety of fonts available. And if the browser can cache font files it can also cache stylesheets with base64 encoded fonts, saving requests at the same time.
- EdwardDiego 11y ago> They're only loaded once. No requests for subsequent usages. Are you sure? Typically a <script> tag pointing to a cached script will still trigger a conditional GET.
- radicalbyte 11y agoIf you include an expiry date with a cache-control header then the server won't be contacted. I typically use this in combination with a unique suffix (for changes) for my web applications. It appears that google are not doing that, they are indeed using these scripts to track your users. Take jquery for example: Response: Remote Address:[2a00:1450:4009:80a::200a]:443 Request URL:https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js Request Method:GET Status Code:304 OK Response Headers: age:414824 alt-svc:quic=":443"; p="1"; ma=604800 alternate-protocol:443:quic,p=1 date:Tue, 29 Sep 2015 15:17:51 GMT expires:Wed, 28 Sep 2016 15:17:51 GMT server:GFE/2.0 status:304
- kawera 11y agoIf Google isn't doing that, wow, they ARE tracking GF users!
- Too 11y agoIf you use ad blocker for privacy reasons you probably also clear your cache once in a while to get rid of tracking cookies. Then you also loose all your cached fonts/jquery/etc.
- radicalbyte 11y agoOh, I block all 3rd party links from all sites with uMatrix. The only things that ever get through are CDNs.
- Animats 11y ago"font servers are the problem here, making several requests to download not only fonts but also js scripts." Right. You no longer need Javascript to download fonts. You don't need multiple versions of the font any more, either. TTF, OTF, or WOFF work on everything current.[1] Early iPhone models (IOS < 4)only accepted fonts in SVG, which was strange, but now they're on board. If you need to convert from one font format to another, see [2]. [1] http://caniuse.com/#feat=ttf http://caniuse.com/#feat=ttf [2] http://www.fontsquirrel.com/tools/webfont-generator http://www.fontsquirrel.com/tools/webfont-generator
- kawera 11y agoThanks. You can also put base64 encoded fonts directly inside your stylesheets; works very well, just be careful choosing not too large fonts.
- freshyill 11y agoFont squirrel lets you do custom subsetting, so you can generate a tiny custom font with only a few characters. I do up exactly that with Font Awesome, so I'm only getting the characters I need.
- kawera 11y agoYes, I did that too in the past for icons but now I just use inline svg - it's tiny and you can style then so... multicolor and animated icons!