App to Cache Google Fonts on WordPress for GDPR

Yet another post diving into the unguided madness that is privacy laws. By all means, while I am in favor of the privacy regulations, it’s hard for me to fathom what service —not what technology— could be in violation of the new law. Google Analytics had its own share of spotlight, hence why I became aware of it and wrote about it previously. A traffic analytics suite has been the prime subject be of the bill, and that’s what the law and regulators were after, openly discussing how it would shape the industry thereafter. But what about fonts?

I accidentally found about Google Fonts’ privacy issues, while I was troubleshooting what happened to Simple Analytics —I accidentally killed the hook along with the legacy GA codes, a story for another time. The problem at hand was simple. Google Fonts is a freely available service, but exchanging data with Google had legal repercussion in Europe. Apparently the regulation-friendly way to host Google Fonts was to cache them.

And this is where it could get out of hands relatively quickly; caching plugins for WordPress have its own requirements for servers, and not all of them work greatly with Google Fonts. In fact, while I was researching on cache related subjects awhile back, one of the recommendations I found was that Google CDN won’t be the bottleneck —it is, now.

OMGF is a plugin that helps with caching Google Fonts. There are features paywalled behind the “Pro” version, but for what it advertises to do on free tier, I wouldn’t call it a freemium software.

One of the features reserved for Pro version is supporting @import on css. That’s how I had done it previously. Apparently it’s a rule of the thumb in industry to use <link> to serve cached fonts. I had styled my css file to have designated @import header to speak of, so it wasn’t hard for me to make the jump. I’ll do a write up on the subject in the future. But for what it’s worth, I’ve seen web developers making strong case for @import, especially to keep the stylistic changes more tenable. Ultimately it’s a matter of preferences, but this plugin does have a price tier.

Leave a comment