I'd also point out that Google CDNs don't work in China and make your websites broken for 1/5th of the world's population. (Not to mention your leaking your user's info to Google - which is a dick move..)
which is a dick move Perhaps blocking a big part of the internet is the real dick move?
Self-host your fonts for better performance
161–170 of 417 posts
Re: Self-host your fonts for better performance
#162Earlier quoted context omitted.
I'm not an expert but: - 1. Copyright (though many fonts are free, true) - 2. Everyone uses a different font (just like everyone uses a slightly different version jquery) so cache hit would be pretty small IMO. Do you really want a browser to be gigabytes large? Especially on mobile it's not viable Maybe if browsers standardized on shipping, say, 20 carefully chosen fonts (not necessarily the most popular ones, just…
> Maybe if browsers standardized on shipping, say, 20 carefully chosen fonts (not necessarily the most popular ones, just a good variety of different types of fonts), the smaller websites would follow and use them; but I think any major brand likes to distinguish themselves and have a custom unique font. It may be not really carefully chosen, but didn't Microsoft have done this already? (Core fonts for the Web, https…
Re: Self-host your fonts for better performance
#163That's a really sad side effect of cache partitioning. By the way, does anyone know if browsers are at least merging/deduplicating cached resources locally again (e.g. by storing cached objects by content hash)? The same could theoretically apply to computationally intensive tasks like WASM pre-compilation (although care should be taken to record the compilation time and delay loading appropriately for cached loads f…
Re: Self-host your fonts for better performance
#164Earlier quoted context omitted.
Web fonts are a big one in terms of making various websites feel fast because, when implemented incorrectly, they massively slow down initial text paint. With that said, they're a fantastic feature but are also way overused. You don't need web fonts unless your website is either heavily type-centric, or has font-related dependencies (such as embedded content of some kind). Icon fonts are also a neat use of web fonts,…
I've sped up sites before by using inline svg rather than icon fonts - downloading an entire icon font for a few icons is inefficient when the actual SVG needed for those icons is < 1Kb and is waaay faster as inline SVG.
I've considered storing each default SVG into the user table and then inlining in the HTML but decided to wait on that optimization since inlining dynamic SVGs itself was such a significant speed boost, especially on threads with hundreds of comments.
Without inlining, each profile image or SVG would be a separate request parallel HTTP request and often at least a couple requests would be slow.
Re: Self-host your fonts for better performance
#165Mainly for performance reasons I've recently gone from using hosted/local Google Fonts to just calling the system ones (some variant of `-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue`).
At my previous job I was one of the only Linux users (using Ubuntu) and some designers were shocked how bad their designs looked on my computer due to the Ubuntu font. We removed Ubuntu from the list and just went with sans serif instead.
Re: Self-host your fonts for better performance
#166Earlier quoted context omitted.
I mean I’ve said it before but shipping like 20 (montserrat, raleway, open sans, etc) would cover most websites who use Google Fonts.
You might be right, but the next question is fashion. Will the same fonts be used still in 5 years, or (more likely) the new hotness will arrive? Should the browsers update the list each year? Then some fonts that were available will suddenly be not? Not so great. Web standards and browser features are generally built for the long term and backward compatibility. I mean, it's not impossible to find a solution, but it…
Re: Self-host your fonts for better performance
#167It's infuriating to see so much web tech being discarded created during the 90s and 00s in good faith, just because the web was subverted into an app delivery platform (in this case, shared caches were obsoleted by timing attacks) and the arms race for ever more crap to counter the negative effects, insufficiently. The web may now be a platform to lock-in and enslave users; just isn't anymore a recommendable place fo…
The capabilities of the web have only been expanded.
You can still build websites in Django and Rails and myriad other "old-school" technologies. What are you missing? Perl and CGI?
To the point of this article, you can perfectly build a website with self-hosted fonts, or with default system fonts. Is this what "lock-in" and discarding good ole' tech looks to you?
It's tiring to see this bitterly pessimistic, conspiracy-laden rhetoric on HN. With the added bonus that as of late it's being radicalized ("subverted", "enslaved"), as some sibling commenters are pointing out. How ironic that the people accusing everyone else of being "enslaved" are themselves carried away by the trends of the time.
But more importantly, this rhetoric is profoundly demeaning.
To web developers and technologists, because it assumes that they are largely incompetent or malicious, and that the commenter and his clique of retro-futurists know much better and are morally more pure than all tech professionals nowadays.
To regular people at large, because it paints them as drones and slaves to greater powers, with no agency whatsoever, instead of analyzing why they may prefer Facebook over old-school forums, and empathizing with them and their problems.
But above all, it's demeaning to the authors of such comments themselves, because it paints them as dejected, bitter fanatics who have lost sight of the forest for the trees.
The web is still full of opportunity - artistic, technical, commercial and otherwise.
If you don't think so, maybe it's time you embrace a low-tech lifestyle and devote yourself to gardening? Everyone will be better off for it.
Re: Self-host your fonts for better performance
#168Earlier quoted context omitted.
Won't this break the UI of most sites because they (ab)use web fonts to add icons? It's annoying to hit a page with a video player, and all the buttons are little boxes with numbers in them because the icon font didn't load...
for me personally, I've only noticed this problem once, but I can't remember which site that was (must be one I don't visit often), but obviously your browsing habits are different to mine. I don't see any disadvantages to giving it a try yourself for a while tho' - it's just a single checkbox setting.
Re: Self-host your fonts for better performance
#169Earlier quoted context omitted.
If you want a really fast web experience, try disabling images and javascript too! (on rereading this I sounded sarcastic, but I really wasn’t trying to be)
I'm using uMatrix and by default all javascripts are blacklisted until I explicitly enable it for the site. The downside of this is that lots of websites are broken, payment sites are non-functional, but after a week of building the whitelist, the web is somehow usable again.
You'll probably have to let it go someday :(
Re: Self-host your fonts for better performance
#170It's infuriating to see so much web tech being discarded created during the 90s and 00s in good faith, just because the web was subverted into an app delivery platform (in this case, shared caches were obsoleted by timing attacks) and the arms race for ever more crap to counter the negative effects, insufficiently. The web may now be a platform to lock-in and enslave users; just isn't anymore a recommendable place fo…
“Enslave users”, really?