Wednesday, September 10th, 2008

UA Profiler: Automatically testing browser features

Category: Browsers, Testing

>

“Steve, have you done a performance analysis on Google Chrome?”

Steve Souders did one better. Rather than just running some tests, he wrote a UA Profiler that allowed him to point a browser and let it roll through the tests:

UA Profiler looks at browser characteristics that make pages load faster, such as downloading scripts without blocking, max number of open connections, and support for “data:” urls. The tests run automatically – all you have to do is navigate to the test page from any browser with JavaScript support. The results are available to everyone, regardless of whether you’ve run the tests. See the FAQ for a description of each test and my list of caveats (additional tests that are needed, limited browser detection, etc.). Here’s the overall scores for some popular browsers.

Browser UA Profiler
Score
Chrome 8/11
Firefox 2 7/11
Firefox 3 8/11
IE 6,7 4/11
IE 8 7/11
Opera 9.5 5/11
Safari 526 8/11

Getting back to where I started, let’s look at Chrome’s performance profile. It’s nice to see that Chrome is at the top right out of the shoot, having 8 of the 11 performance attributes tested, tied with Firefox 3 and Safari 526. The three performance features Chrome is missing are loading scripts and other resources in parallel, not blocking downloads when a stylesheet is followed by an inline script, and support for prefetch links. Looking at the Chrome user agent string we can see it’s based on Safari 525. If Chrome incorporates Safari 526 improvements, it’ll fix the most important performance trait – loading scripts in parallel. The detailed results show that Chrome has one improvement over Safari: caching redirects that have an expiration date in the future.

Steve is keen to add more tests, so what would you like to see? I think that there is room to tests for non-performance related features too. For example, tests such as “does the browser support postMessage” would be nice to see. There are a bunch of “is there window.Foo” at the shallow level, and then going deeper. CSS and selector tests could be added too.

Related Content:

Posted by Dion Almaer at 9:07 am
7 Comments

+++--
3.5 rating from 37 votes

7 Comments »

Comments feed TrackBack URI

The tests say that all tested browsers accept gzip encoded documents, but I have found that IE6 support really sucks for gzip. Maybe figuring out which particular version of IE6 (with certain hotfixes) support gzip.

Comment by howardrauscher — September 10, 2008

On a related note… what is the best way to perform Object detection to sniff the presence of E4X? Would rather do that than browser sniffing. If anyone knows, can you post some info or a link? Thanks

Comment by holts — September 10, 2008

holts, try something like this:

try {
var x = new XML();
}catch(e){
console.log(‘E4X not supported’);
}

Comment by danh2000 — September 10, 2008

@howardrauscher… only problem I encountered was that IE6 does not support gzipped script files added dynamically via the DOM

Comment by RoryH — September 11, 2008

This problem occurs not only in IE6

Comment by webflake — September 11, 2008

Congrats fellow,
Great job!

Comment by ViniciusCamara — September 11, 2008

yes good work
graet blog

Comment by Tribulus — October 1, 2008

Leave a comment

You must be logged in to post a comment.