JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Browser environments for testing

In a previous post I mentioned using virtual machines for testing.

Here's the three virtual machines that I feel cover the most options for browser testing (on Windows): 

Current versions

Looking at the top 10 browsers for this site, using data from Google Analytics, we have; Internet Explorer, Firefox, Safari, Chrome, Mozilla, Opera, Playstation 3, Konqueror, SeaMonkey, and Camino.

Of those, Internet Explorer and Firefox, obviously, account for the largest amount of traffic, at about 86% of all visits. Safari is a respectable 6.6%, Chrome at about 2.7%, Mozilla at 2.1%, and Opera at 1.8%.

Some may think I'm a bit off, but I consider Opera a fairly good browser, while Mozilla doesn't much concern me. So, that gives us our top five browsers, all of which can be installed on Windows. 

So, any test environment for current versions of browsers (on Windows), should include the following (in order of importance).

  1. Internet Explorer 7
  2. Firefox 3
  3. Safari 3
  4. Chrome 0
  5. Opera 9

There's talk that Chrome may replace Firefox, if Google stops supporting Mozilla, so while Chrome may have low usage numbers, it's fairly standards-compliant.

This is also why I feel that not including Opera would be a very big mistake.

This rounds out our first virtual machine to 5 unique browsers.

Previous versions 

While it would be great if it wasn't the case, you'll always need to support older versions of popular browsers.

Again, looking at Google Analytics for this site, almost 25% of Internet Explorer users are using version 6. Firefox, which supposedly has some issues in version 3, that are keeping users back in version 2, is about the same, with 75% of users on version 3.0.3 or 3.0.4 (I suppose there may be some overlap there).

Most other browsers don't actively support so many previous versions, which means that a virtual environment for past versions of browsers can stick with the following.

  1. Internet Explorer 6
  2. Firefox 2

Upcoming versions

This virtual machine is really focused on browsers currently in beta, or that may otherwise not be in the top listing.

Primarily, that means the following should almost certainly be included.

  1. Internet Explorer 8

That's right, Internet Explorer 8. That's all I'd absolutely need, especially looking at stats.

However, to a great extent, Chrome, like most of Google's other products applications is truly a beta browser (and one that I've had numerous issues with, probably due to that fact) and that might suggest that it should truly be installed in this environment.

What about Linux and Mac? 

The top browsers for Linux, again according to this site, are Firefox and Mozilla, which should function the same as they are on Windows (and, again, I consider Firefox and Mozilla to be basically the same). It's extremely easy, and free, to get started with any number of Linux environments, but I just don't know that it makes all that much sense. (Keep reading for the clarification of this statement.)

For Mac we have Safari and Firefox. The latter should be very similar to the Windows version.

For Safari Apple was kind enough to give Windows users this browser. As to whether it's the same as the Mac version, well, it looks very similar. But, unless you're willing to pay the Apple premium, the Windows version should suffice.

For these reasons, basic Web development doesn't need to dive too deep into Linux and Mac environments.1

Mobile browsers?

But what about browsers on mobile devices?

Both Safari, Opera, and Internet Explorer have mobile versions available (in the case of Opera, they have two), which will definitely change the output of your site.

To some extent Lynx fills this hole by providing a text version of your site, and therefore might make sense installed on a virtual machine.

The standard Opera browser also provides a mobile-like 'emulator' for your site, by way of the Small View functionality.

However, for the mobile version of Internet Explorer (which won't be tracked by Analytics, as it doesn't support JavaScript (speaking of Windows Mobile 6)) accessing an emulator is not quite as easy.

As to the solution, I can't say I can provide one, but as we move more and more towards mobile devices, perhaps we'll be virtualization for these environments much more readily available.

Conclusion

Above I've suggested three virtual environments, for Web site development. For the majority of projects, I think having current versions of the top three browsers - Internet Explorer, Firefox, and Safari - would be quite enough.

What do you think? What do you develop for?

Notes

1. Of course, I realize that if you were going to create a Flash or Silverlight application, you'd naturally want to test on both Mac and Linux (or if your app becomes popular, you'll get some backlash on Slashdot). At that point what you're really testing is the environment, and not just the browser. But, for the 'majority' of Web sites, I personally feel that virtual Mac and Linux environments are unnecessary. Compare this to my feelings a number of years ago, before Safari was available for Windows, and you'd see a different view.2

2. I also recommended Lynx and Netscape in that post, but no longer see that as necessary, entirely.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Wowsa - what happened to Google Analytics? (November 2008 edition)

Google has done it again.

Logging in this evening, I immediately noticed the change to Google Analytics. Now you can see, when you first log in, the visits, average time, bounce rate, completed goals, and % change (default visits) for your sites.

It's weird in that it shows a number of rows, and not sites (which effectively means half as many sites as I expect, as each of my sites has two rows), but it's very interesting.

(I'm also getting a mixed content warning (secure/unsecure), but I'm sure they'll fix that shortly.)

The rest of the reports seem to be the same.

Very nice Google. Now if I can just get the invite to type Adsense with Analytics ...

Tags:

Categories: Internet

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Log Parser script: Percent of status codes across all hits/requests

Note: This article was written using Log Parser 2.2. Therefore, while it may work for a different version, it may not.

The following SQL can be used by Log Parser to generate a chart with the total requests (for a day, month, or year) and what percent each status code is of those requests. An example chart can be found at the end of this article.

First, I assume that the below is put in the same directory as the logs you would like to parse. 

SELECT sc-status AS [HTTP Status Code], count(*) AS Requests
INTO http_status_percent_graph-%date%.png
FROM ex%date%*.log
GROUP BY [HTTP Status Code]
ORDER BY Requests DESC

Once you've saved this, you can call the script like such, so long as you're already in the directory you saved the SQL file.

logparser file:http_status_percent_graph.sql?date=0710 -o:chart -chartType:Pie -chartTitle:"Status as Percent of Requests"

If you just want the numbers, you can use the following SQL.

SELECT sc-status, count(*)
INTO http_status_codes-%date%.txt
FROM ex%date%*.log
GROUP BY sc-status
ORDER BY sc-status

It too can be called via the command line (again, assuming you save the SQL file and run the following in the same directory as your log files).

logparser -rtp:-1 file:http_status_codes.sql?date=0710 

Feel free to modify the scripts to your own need.

Example chart

Example of the status code chart
Example of the status code chart