Web Fonts Performance
speakerdeck.com
speakerdeck.com
[0]: http://github.com/captn3m0/disable-web-fonts
[1]: https://chrome.google.com/webstore/detail/olmabeadgbpmhllgdk...
Thanks for the extension.
That is all you should do, it will land in Chrome stable shortly and is already in Firefox.
--disable-remote-fonts
You can find a tonne of other optimizations you can do to Chromium here: peter.sh/feed/chromium-command-line-switchesAlso if you want fonts that load faster than Google Wenfonts, have a look at http://brick.im/
I use Brick on a tonne of different side projects, and there is a marked decrease in loading time. Brick uses Fastly, which is (arguably) a faster CDN than Google Webfonts and other webfont initiatives like Adobe Webfonts.
Also using Brick is another chance to ban Google from your web traffic as many are doing...Google is like a barnacle that is stuck to the web and is hard to remove entirely without them slurping some of your data
Not saying you shouldn't use the best solution for you. In fact, I ship code that hits the Hoefler & Co. webfont CDN because it's the only source for the fonts we use.
I guess prefetch does exactly that, but wondering if the "hack" would work.
However link preload seems to be golden.
But what is preload vs prefetch?
Ah firefox will only prefetch when the browser is idle.
So we have to wait for preload support.
http://caniuse.com/#feat=link-rel-prefetch
http://caniuse.com/#feat=link-rel-prerender
http://caniuse.com/#feat=link-rel-preconnect
(doesn't work as of 10/2015) http://caniuse.com/#feat=link-rel-preload
It will save lots of Request, and latency.
In a perfect world, these most popular website would have their Script and Fonts in CDN and be cached already. But what we are seeing is that still lot of the same stuff used around still not being cached.
1. Privacy
It's well known that companies such as Google and Adobe use web fonts to track users that may not even (knowingly) be their customers.
2. Performance
Just last week I logged a bug with our developers when our monitoring started picking up that one of their staging / demo sites was taking a long time to render, turns out they were using a web font provided by Hoefler & Co's 'typography.com' which is incredibly slow to load, here's the waterfall of the page load: http://i.imgur.com/riNT3hH.png
My enjoyment of the web improved immensely when I disabled font selection on web pages and imposed my own serif font over them all.
Occasionally this does result in breakages when a particular site relies on icons embedded in a web font but I accept that as the cost of my choice.
I was once complaining to a friend how ugly site X is and he said it looked right to him; later when I saw his machine it has a nice display that made site X look twice as better on my shitty display.
Lots of sites are designed on (and for?) high density displays and it ends up looking awful on low resolution screens like mine.
Also most 'normal' users will never pay the x4-x10 premium price for some fancy IPS display and calibrate its colors.
Citation?
Google Web Fonts explicitly doesn't use any cookies or track users in any way: https://developers.google.com/fonts/faq?hl=en#what-does-usin...
Did they budget for those 2 seconds extra load time while they set up the new design?
I added in some 'lookalike' fonts from Google in the places where the typography.com font should have been, all looked improved, everything worked.
But then we hire some new clowns to do some new theme. Obviously I am typecast as a 'backend dev' so I was not privy to whatever those conversations were. So the typography.com font is back in use! Fantastic (not)!!!
So the same process that led to the last awful frontend (get some agency that don't care about our product to project manage something to death) results in the reappearance of the same awful font technology.
That sir is how typography.com still get customers. The marketing people, the managers that have no technical skills, the print designer and some outside agency just do it even though (four months earlier) the only coder in the building speeded up the site and made it vaguely legible by getting rid of the silly typography.com junk.
I am very much a believer in design which is content first and, as Steve Jobs said, 'how it works'. I too like a good font and always inspect a page where the typography stands out as I like to be informed on font names and combinations. I am also a believer in going for AA accessibility. Obviously the typography.com font will be spidery grey text against a grey background, not accessible!
But I wasn't even completely sure I was reading Google's licenses right (and I don't have notes to track what docs I was looking at, sorry), and then other hosts like Adobe are another thing entirely.
However, may I suggest a completely radical alternative at optimizing your webpages? Don't just avoid Web Fonts, avoid CSS altogether. Take a look at my website. Did you notice how fast it loaded, despite not using a CDN? Of course, this is a bit tongue-in-cheek. There are many legitimate uses of styling web pages, but for websites whose purpose is simply to convey information (the main reason people were excited about the WWW in the 90's), I personally think unstyle'd, or mostly unstyled HTML is the best way to go.
In the case of this website, the author has decided to leave the question of how to render the page almost entirely to the client,
Even in the early Netscape days the Navigator browser supported setting the default font sizes and colors. These options are still available today. If you want more control over the default rendering, you may want to submit a feature request for your browser of choice, but you may be able to simply edit the default stylesheet.
So if I visit 100 different websites daily, and most of them are the ones I've never seen before - I will have to spend half of my life just writing stylesheets for each of them? No, thanks, It's not a world I want to live in...
I didn't say anything about writing custom stylesheet for a particular website. I said you should change your user agent so it renders html in the style you want. You do this ONCE.
Design, fashion, and art aside... how can 1 design or style even work for the entire range of websites and web apps? UX is important, and must be different depending on the goals of the site.
Yes. Does you get annoyed that most books have the same formatting - a style you didn't get to choose? My mother absolutely loves her kindle, because it let her do exactly what I'm talking about and apply a font that she can actually read to all books.
> how can 1 design or style even work for the entire range of websites and web apps?
Of course not. That's why HTML let you specify styling to override the default stylesheet in the cases when it is important.
More importantly, I never said anything about not styling your pages, nor did I claim one style should apply to ll pages on the internet. I replied to a post complaining about the DEFAULT STYLE. I suggested that it is the responsibility of the client to render that style as they like.
How, exactly, does this get in the way of your ability to apply formatting?
Not like they used to make them though, at least not out of the box :(
http://www.opera.com/docs/usercss/
http://slashdot.org/story/02/12/18/1328245/opera-gives-that-...
In Firefox, I see options to change font sizes and colors, but nothing to select a default stylesheet. I know it's bound to be in about:config, but it might as well not exist then. Opera had it right there in the "view" menu, changing between author and user mode took two clicks, selecting a user stylesheet took three, while it takes me four clicks in FF to realize it doesn't even have that option, and mere common sense to not even bother checking in Chrome. Progress!
Needs html, body tags, but otherwise I like it.
b) HTML5 spec: A body element's start tag may be omitted if the element is empty, or if the first thing inside the body element is not a space character or a comment, except if the first thing inside the body element is a meta, link, script, style, or template element.
Who cares what google thinks. They are not the w3c.
> HTML5 spec
It's not an HTML5 document.
https://validator.w3.org/check?uri=http%3A%2F%2Fandrewbelt.n...
Even if you want to ignore the required <!DOCTYPE html>, the document is still missing the required <head> with exactly one <title> element.
90% of the web?
>They are not the w3c.
W3C? What's this 1999? It's all about the HTML5 group now.
I bet a website with inlined CSS on a CDN is much faster than yours.
But don't overdo it:
But I still don't consider reliable FOUT a victory -- it's still annoying as a reader. I'm not sure if the final slide cross this out because his design has a solution to it, or because he decides not to consider it a problem. I _think_ the latter maybe? (Slidedeck without the accompanying narrative can be hard to interpret sometimes!). If so, I disagree, reliable FOUT with otherwise quick loading may be the lesser evil in the present environment, but it's still annoying.
It disables web fonts for all uses except icons.
Edit: found the relevant bug: https://code.google.com/p/chromium/issues/detail?id=58456
Seriously. FLOUT is NOT in any way bad. Stop trying to hide the unstyled text, I don't have 20 minutes to wait for your shitty webfont to load. If you do hide your unstyled text, I'll instantly leave your website again.
(See sibling comment about typography.com failure mode.)