Front-end performance for web designers and front-end developers
csswizardry.com
csswizardry.com
I hate it when people criticise without giving specifics, so here are some of the more obvious examples:
- The article mentions image sprites, complete with the trendy but semantically dubious hijacking of the <i> element for icons, but does not discuss data: URLs.
- The article talks about the performance implications using subdomains, but doesn't mention anything about cookies.
- The article makes many assumptions about how assets are loaded that may be true in the major browsers right now but tend to change very fast, and even then it doesn't mention that there are actual standards for how browsers are supposed to behave in this respect (which in turn not all browsers follow).
- The article promotes techniques that will achieve lower quality results, such as serving low-res assets to high-res devices and using CSS approximations of effects to avoid using image files at all, without considering techniques for serving some but not all assets depending on the nature of the requesting device. Crucially, there is also no hard data at all about what the relative costs actually are and therefore whether these implied optimisations are actually giving worthwhile savings.
In short, this article is a decent thought-provoker if you're new to front-end development and aren't necessarily aware of these kinds of issues, but it's not comprehensive (and there are other resources that are) and it does advocate some questionable practices.
Just tried out my site on Insight". Wow! I scored horribly lol. This is good news though and I will learn a lot from this.
One of my favorite quotes comes from my favorite pitcher Greg Maddux. (I'm paraphrasing of course). "You learn more when you have a game where things go wrong as oppose to a game where things go right" (something like that)
SPDY and now HTTP2 solve this problem with multiplexing and pipelining, but it seems like an obvious addition to lump in with chunked encoding and persistent connections. We have the benefit of hindsight now, but that does still seem like a clear oversight.
This mistake and its workarounds has lead to websites being much more latent and DNS lookups being more apparent in page loading performance (forcing a meta hack around that problem, too), and now that the connection speed is rarely the limiting factor, this is one of the most glaring perf failures in the design of the spec. When I look at how we get around browser connection limits and the fact that HTTP is inherently serial in its requests, I can't help but feel overwhelmed with disgust at how massive a hack this is.
Edit: turns out the limit of two connections is in the RFC for http 1.1 but browsers starting with ie 8 have ignore that part of the spec.
>Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.
edit: specify CDN used