News for hackers. Stuff that matters.
Re:Web Fonts Performance by vortico on Sunday October 04, 2015 @04:25AM (#10326901)
I'll admit I didn't know about the HTML link preload feature. This presentation does a good job at emphasizing (but hopefully not exaggerating) its effectiveness.

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.

Re:Web Fonts Performance by sotojuan on Sunday October 04, 2015 @06:10AM (#10327096)
A little CSS goes a long way:

http://bettermotherfuckingwebsite.com

Re:Web Fonts Performance by discreditable on Sunday October 04, 2015 @12:26PM (#10327944)
> A little CSS goes a long way

But don't overdo it:

https://bestmotherfucking.website

Re:Web Fonts Performance by usaphp on Sunday October 04, 2015 @04:46AM (#10326953)
I would not want to live in a world where all websites look like yours.
Re:Web Fonts Performance by pdkl95 on Sunday October 04, 2015 @09:52AM (#10327499)
So change your User Agent so the website renders the way you like. That is the entire point of HTML; the client decides how to render the page, with the HTML (and CSS) optionally providing suggestions.

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.

Re:Web Fonts Performance by usaphp on Sunday October 04, 2015 @10:27AM (#10327579)
> So change your User Agent so the website renders the way you like

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...

Re:Web Fonts Performance by pdkl95 on Sunday October 04, 2015 @10:42AM (#10327644)
Ok, do you seriously not understand what it means to be the default stylesheet? Have you ever actually changed the font setting in the browser?

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.

Re:Web Fonts Performance by jordanlev on Sunday October 04, 2015 @01:08PM (#10328063)
Ok, do you seriously not understand what it means to not want every website you come across to look the same? (Even if it's the same of your own choosing).

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.

Re:Web Fonts Performance by pdkl95 on Sunday October 04, 2015 @02:27PM (#10328318)
> Ok, do you seriously not understand what it means to not want every website you come across to look the same?

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?

Re:Web Fonts Performance by PavlovsCat on Sunday October 04, 2015 @12:28PM (#10327946)
> These options are still available today.

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!

Re:Web Fonts Performance by vbezhenar on Sunday October 04, 2015 @05:54AM (#10327047)
Ha-ha. I initially spent quite a lot of time to make my website nicely styled, with fonts and JS. But then I decided that all those bells and whistles just not worth it and used pure HTML as you did. Probably I'll add just a little bit of styling anyway, but it works fine as of now. And it works fine on tablets and smartphones without any effort :)
Re:Web Fonts Performance by imaginenore on Sunday October 04, 2015 @04:54AM (#10326967)
Why serve HTML at all then? Serve text, it's even faster.

I bet a website with inlined CSS on a CDN is much faster than yours.

Re:Web Fonts Performance by mixmastamyk on Sunday October 04, 2015 @05:00AM (#10326971)
He has lots of links. It's the web as TBL intended.
Re:Web Fonts Performance by jordanlev on Sunday October 04, 2015 @01:04PM (#10328052)
People like design. People like things to not all look the same. Companies require design for their branding and marketing. To suggest that everyone's website looks the same and just be browser default styles is ignoring an enormous fact of human nature (not to mention the global economy and civilization in general).
Re:Web Fonts Performance by mixmastamyk on Sunday October 04, 2015 @04:49AM (#10326955)
And of course, javascript just to show static content.

Needs html, body tags, but otherwise I like it.

Re:Web Fonts Performance by stonogo on Sunday October 04, 2015 @09:48AM (#10327489)
Which browsers fail to render html if it's missing <html> and <body> tags?
Re:Web Fonts Performance by pdkl95 on Sunday October 04, 2015 @10:00AM (#10327517)
The existence of Quirks Mode is not an excuse to write sloppy markup.
Re:Web Fonts Performance by coldtea on Sunday October 04, 2015 @01:24PM (#10328100)
a) "The Google Style Guide for HTML recommends omitting all optional tags. That includes <html>, <head>, <body>, <p> and <li>" https://google.github.io/styleguide/htmlcssguide.xml#Optiona...

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.

Re:Web Fonts Performance by pdkl95 on Sunday October 04, 2015 @02:37PM (#10328351)
> Google Style Guide

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.

Re:Web Fonts Performance by coldtea on Sunday October 04, 2015 @04:34PM (#10328708)
>Who cares what google thinks.

90% of the web?

>They are not the w3c.

W3C? What's this 1999? It's all about the HTML5 group now.

Re:Web Fonts Performance by stonogo on Sunday October 04, 2015 @10:32AM (#10327613)
This is not an exercise in moral justification. I'm asking if there are any browsers that fail to render documents without <html> and <body> tags. Do you have an actual answer?
Re:Web Fonts Performance by slemklump on Sunday October 04, 2015 @04:54AM (#10326966)
This. CSS should be left to the clients and not to the servers. Just serve a plain HTML file and let the users (or their browsers) decide what to do with it.