CSS begins to get the same attention as JavaScript

Top 5 Mistakes of Massive CSS was one of the top 3 presentations at Velocity . It is interesting to see CSS beginning to get the same kind of attention as JavaScript.

The link to the blog post includes descriptions, video, slideshare and a summary of how the Alexa Top 1000 stack up. There is also some information on how Facebook tackled some of their performance issues in this area.

While I like the overall approach in the article and have looked with interest at Nicole’s (aka, “stubbornella”) work, I am also hopeful that the adoption of systems such as Sass or LESS will also take this forward.

The state of e-commerce websites – Part 2: Categories & Sub-categories

In this post I have collected the performance of the first category and then a further sub-category from the sites I am looking at.

I let webpagetest test run each test 10 times to get a better average – This is still not that scientific but hopefully will be a little more representative. At some point I will go back and do the same for the home pages.

Now we are off the home page, we should be getting into areas that more represent the architects and engineers work.

Some things to call out on the Category Pages are:

  1. Barnes and Noble first view time is nearly double that of everyone else – This appears to be caused by downloading nearly 40 JS and CSS files before getting to an image. Seriously, there are 36 javascript files and 12 CSS files called by this page. Also, the CSS and JS are intermingled so that they can’t even get the CSS to download in parallel.
  2. CB2 has the largest initial payload at ovr 1MB. The main component of this appears to bet the VisualCart.swf coming in at 493KCB2 - VisualCart.swf Size
  3. Crate & Barrel and Sephora come in with over 90 repeated requests when the category page is called for the 2nd time. This is nearly 3 times more than Amazon, which at 33 still has nearly 20 more requests than the next highest.
  4. Amazon and Sephora both have over 100K in requests for a subsequent download. This seems a little high, although it will take a little more research to identify what is being reloaded that is not being cached

The spreadsheet is embedded below.

Adding <script> asynchronously

Steve Souders comes up with what should be the definitive way to add script into a web page. This is particularly relevant to widget and third party code develoers.

Steve Souders comes up with what should be the definitive way to add script into a web page. This is particularly relevant to widget and third party code developers.

Part of the acceptance criteria for third party code in an e-commerce environment is its lack of impact on performance and other code in the page

The article appendChild vs insertBefore I hope will be part of a set of best practice conclusions from his P3PC series.

To augment your reading of this article it is also worth reviewing the information on browser “busy” indicators that was contained in the lesson Load Scripts Without Blocking from his CS193H Stanford class.

Based on the above, I tend to use XHR injection for local scripts to avoid the Firefox busy indicator and script DOM element insertion for offsite 3rd party code.

The state of e-commerce websites – Part 1: Overview

A big disclaimer up front – I am currently working for Williams-Sonoma which includes the Pottery Barn family of websites and West Elm. It is part of my role to look at front end performance with particular reference to the javascript.

I was surprised to find how many e-commerce sites are based around the Bay Area. From Walmart.com in Brisbane to Macys and Bloomingdales downtown.

Performance is an important aspect for e-commerce sites and so I thought it might be interesting to look at a group of them and compare speed, page weight, third party scripts and potential performance improvements.

In looking at the websites I want to look at 1) The home page, 2) a category / sub-category page and 3) A product page.

My first task was to get a list of the sites I want to look at. As I am working for a company taht has retail stores and also an online presence I thought it would be interesting to look at sites with a similar background.  The ones I chose are Macy’s, Bloomingdales, Sephora, Walmart.com, Crate and Barrel, CB2, Gap and Barnes and Noble. I have also added Amazon.com as a pure internet business to see if that makes a difference.

I am going to use a variety of methods to examine the sites – Initially I’ll use webpagetest.org to get some initial stats and I will also get the grades Google’s Page Speed and Yahoo!s YSlow Firefox plugins

For this post I have just gathered some basic information on the home pages of these sites. Home pages are generally the first page a user sees. and first impressions are important. However, in general, they are not necessarily reflective of the rest of a site and so I think should be treated differently.


All webpagetest.org tests were carried out with the following params From: Dulles, VA – 1.5Mbps ADSL using IE7

Updated 5/15/2010: Added Best Buy so we have a 10th clicks and mortar store