News for hackers. Stuff that matters.
Re:Google Fonts Analytics by cronix on Wednesday February 19, 2020 @02:24PM (#22369037)
Yeah, 36 trillion requests slowing down the loading of websites. Way, unnecessarily, overused.
Re:Google Fonts Analytics by irrationalactor on Wednesday February 19, 2020 @02:51PM (#22369326)
The sterile world you desire is not one I'd like to live in.
Re:Google Fonts Analytics by Waterluvian on Wednesday February 19, 2020 @03:07PM (#22369499)
It's like my desire for quality CLI apps and APIs before any sort of fancy schmancy GUI. The important part is reminding one's self that the other 99% of people want and need the GUI version of the app.
Re:Google Fonts Analytics by paulmendoza on Wednesday February 19, 2020 @02:25PM (#22369052)
If google embedded the top fonts in the browser this wouldn’t be an issue. I don’t understand why the font selection in browsers is so limited.
Re:Google Fonts Analytics by btown on Wednesday February 19, 2020 @02:46PM (#22369281)
Practically there's no difference between a browser that lazily downloads builtin fonts, and a global URL for a font file across websites with an extremely long TTL. And you don't want the browsers to be even more bloated than they already are!
Re:Google Fonts Analytics by gioele on Wednesday February 19, 2020 @03:16PM (#22369585)
> font file across websites with an extremely long TTL.

Caches are no longer shared across domains because doing so leads to privacy leaks: https://www.jefftk.com/p/shared-cache-is-going-away

Re:Google Fonts Analytics by sp332 on Wednesday February 19, 2020 @03:25PM (#22369681)
-
Re:Google Fonts Analytics by anamexis on Wednesday February 19, 2020 @03:43PM (#22369845)
The parent comment's point is that this cache is partitioned by frame origin (which the link details).
Re:Google Fonts Analytics by hinkley on Wednesday February 19, 2020 @02:55PM (#22369372)
Then why are there 36 trillion requests?
Re:Google Fonts Analytics by r0bbbo on Wednesday February 19, 2020 @03:03PM (#22369463)
A lot of people using a lot of fonts from a lot of different browsers. I'm sure the caching techniques aren't perfect but they're probably quite good.
Re:Google Fonts Analytics by hinkley on Wednesday February 19, 2020 @03:22PM (#22369645)
It's been a while now, but at one point there were some numbers that came in that showed that a much higher fraction of user agents arrive at a web site with a completely empty cache [than you might expect].

Enough so that if you rely on caching for user experience, your average user is not going to have a good time.

Re:Google Fonts Analytics by BiteCode_dev on Wednesday February 19, 2020 @04:28PM (#22370288)
There is a HUGE difference:

- not all sites use CDN, even if using the same font

- not all sites use the same CDN

- users clear the cache (clearing history does that on firefox)

- incognito mode is a thing

- first load matters a lot

- browser have a limit of the disk space they use for cache, and they evict older entries when they reach it. Given sites are now bloated, this fills up fast.

- this repeats for each browser. I have 5 on my laptop, 3 on my mobile, 2 on my tablet.

Re:Google Fonts Analytics by basseq on Wednesday February 19, 2020 @02:50PM (#22369310)
Font selection in browsers isn't limited. Browsers don't have embedded fonts—they rely on whatever fonts are installed in the operating system.

The challenge is that to ensure consistency, you need to use the "lowest common denominator" of fonts that are installed by default across all operating systems. Which leaves you with (like) Arial, Times, Courier, Verdana, Georgia, Palatino, and (hahahaha) Comic Sans.

The real answer here is why web designers use Google Fonts as opposed to embedding their own fonts. To which the answer is: it's so much easier. (Tech, licensing, formats, compatibility, etc.)

Re:Google Fonts Analytics by pcwalton on Wednesday February 19, 2020 @05:18PM (#22370712)
> Which leaves you with (like) Arial, Times, Courier, Verdana, Georgia, Palatino, and (hahahaha) Comic Sans.

Not Palatino.

And most of those fonts have licenses that are inconvenient at best. The only thing that allows them to be packaged for Linux distributions is Microsoft's '90s-era "Core Fonts for the Web" initiative. This initiative is long discontinued, and so the fonts cannot be downloaded from Microsoft anymore. Only the '90s versions of the fonts are free. Worse yet, the license forbids packaging the fonts in any way other than with their original 32-bit Windows installer, which means that hacks like cabextract are necessary to install them on any other system.

Re:Google Fonts Analytics by penagwin on Wednesday February 19, 2020 @02:53PM (#22369361)
I think what they mean is why don't browsers just include the most popular fonts, so the underlying OS doesn't matter?

Instead we're restricted to only a few fonts that actually have decent cross platform support.

Re:Google Fonts Analytics by tobr on Wednesday February 19, 2020 @03:04PM (#22369468)
The only way to do that would be to include particular typefaces as part of the CSS specification, rather than just the generic font-family keywords like “sans-serif” and “monospaced”. But who should pick them, which ones would they pick, and how would they be licensed?

It’s kind of the same problem as saying that the browser should include common images. Which images? Why? How many?

Re:Google Fonts Analytics by est31 on Wednesday February 19, 2020 @03:54PM (#22369943)
> It’s kind of the same problem as saying that the browser should include common images. Which images? Why? How many?

Images follow a different usage distribution than fonts. I'd say that the top 100 fonts are enough to render most web content, for images I'd say this is obviously different, the top 100 images might appear often but not as often as the top 100 fonts.

Google is already distributing the equivalent for text, in the form of the brotli corpus which ships in every Chrome installation.

Re:Google Fonts Analytics by basseq on Wednesday February 19, 2020 @04:05PM (#22370046)
> why don't browsers just include the most popular fonts, so the underlying OS doesn't matter?

Well, pontificating here:

1. Because many applications don't ship with additional fonts, and it's an additional layer of complexity. Some do—Microsoft Word comes to mind, IIRC.

2. Because you're still left with the same problem: unless all browsers can agree on an additional set of standard fonts, you as a web developer will only want to use those installed by Chrome and Edge and Safari and Firefox.

3. Because licensing for desktop application may (?) be more of a pain than licensing for web usage. Which may not matter for Google Fonts, since they may be the license holder for all anyway. I don't know.

Re:Google Fonts Analytics by StLCylone on Wednesday February 19, 2020 @02:33PM (#22369140)
Loading fonts is tracking and data collection. It's what Google does. If they build the fonts into the browser, then tracking/data collections calls are not made.
Re:Google Fonts Analytics by jjeaff on Wednesday February 19, 2020 @02:41PM (#22369218)
They could embed it in Chrome. If someone is using Chrome, google doesn't need any more points of data. They know everything you do.
Re:Google Fonts Analytics by bryanrasmussen on Wednesday February 19, 2020 @03:01PM (#22369448)
yeah but you can sort of opt out of tracking by chrome, so its best to have fallbacks to be able to track all the things!
Re:Google Fonts Analytics by theandrewbailey on Wednesday February 19, 2020 @02:31PM (#22369123)
Last I checked, browsers don't come with fonts. Browsers use the OS's fonts if a webpage doesn't have them. I'd rather browsers not maintain their own fonts.
Re:Google Fonts Analytics by jsw on Wednesday February 19, 2020 @02:27PM (#22369082)
That sweet, sweet traffic data.
Re:Google Fonts Analytics by trillic on Wednesday February 19, 2020 @02:29PM (#22369099)
The top fonts aren't the issue for page loading, they'll be cached 99% of the time. It's more obscure fonts that actually hit the server causing the issue.
Re:Google Fonts Analytics by thrower123 on Wednesday February 19, 2020 @02:45PM (#22369261)
So many things about the web would be better if browsers shipped basic functionality.

I cringe when I think about how many petabytes of jQuery has been sent over the wire over the years.

Re:Google Fonts Analytics by basilgohar on Wednesday February 19, 2020 @03:29PM (#22369711)
But they do. Javascript itself has evolved significantly over the past decade obsoleting many features that used to solely be provided by add-on frameworks.

HTML5 as a living standard brings the majority of the needs that used to be served by plugins – interactivity, dynamic pages, two-way communications, multimedia.

WebSockets provide for realtime communications with the browser, something again not possible without 3rd-party plugins.

So, what you are saying is in fact happening. But that doesn't mean it's not an issue with sliding goalposts. It's just that it doesn't happen as quickly as we all may like it, but that's because "basic functionality" is a constantly moving target with different definitions depending on who asks.

Re:Google Fonts Analytics by sp332 on Wednesday February 19, 2020 @03:33PM (#22369756)
Decentraleyes is a browser extension that locally stores the most popular CDN-hosted JS libraries, including Angular, Backbone, and jQuery. https://addons.mozilla.org/en-US/firefox/addon/decentraleyes...
Re:Google Fonts Analytics by sp332 on Wednesday February 19, 2020 @03:24PM (#22369662)
CSS, HTML, images, text content all slow down websites. Oh wait they ARE the websites!
Re:Google Fonts Analytics by marcosdumay on Wednesday February 19, 2020 @07:09PM (#22371556)
Well, you are free to block those and, differently from Javascript, will miss no functionality.
Re:Google Fonts Analytics by Reedx on Wednesday February 19, 2020 @05:36PM (#22370850)
What's a better solution if you want to use a non-standard font?

At least in this case a lot of the requests are cached across sites.

Re:Google Fonts Analytics by omnimus on Wednesday February 19, 2020 @05:49PM (#22370952)
The problem si that number of "standard" fonts are thining. It sucks having different widths of fonts on different platforms. You will have to load some webfont if you want consistency.