The Client Statistics Gatherer   1 | 2 | 3 | 4 | 5 | 6 

The rejects

Redirection  In this method, the top page for the site is actually a JavaScript routine that redirects the user to one of several different pages, depending on the user's screen resolution. The rest of the page provides a non-JavaScript version of the site. The designer would then review the server logs to see how many times each "resolution page" was hit.

This is the "fast and crude" solution, but does the cardinal sin of screwing with the back button, because this client-side page redirection will kick in every time you try to go back from the page to which you were bounced. It's also not exact, since all it does is narrow down the field into buckets, but doesn't tell you window size (do they surf full-window?) or color palette info.

Pop-up and submit  Here, a pop-up window gets the information, then politely alerts the user what is going on, and just asks them to close the window. When they do, a form is submitted to the server.

This is fine, but like all other solutions here, it is obtrusive. I don't like the idea of bothering the user about this. I want to get the information without alerting the user and interrupting their browsing experience.

Signed JavaScript or Java applets  A digitally-signed JavaScript script could, in theory, get this information and pass it back to the server in the background, but these only work on Windows, only in Netscape, and are a total pain to set up. And client-side Java is more useless and outdated than a Y2K clock.

Cookies  Admittedly, I shunned this because I was anti-cookies back in the late 90s. But after signing on to Amazon.com for the eighty-seventh time in a week, and seeing just how widespread their use has become, I got over it. So today, I've come to accept that storing the information in a cookie and reading it back later is a feasible solution that is even better in some ways that what I'd done originally. With cookies, you can ensure that each user is counted only once (until their cookie expires), so the grandmother from Denmark with a 14-inch monitor at 480x320 resolution that fell asleep on the reload button won't tilt the scales against everybody. So I enhanced my version of the script to gather statistics by user, rather than by visit.

However, the pure cookie solution does require a bit more work to retrieve the results. Once the cookie is sent down, I need to be able to read it back and record the information somewhere, but I can only do this before sending the page to the client. So this means I have to fetch and parse the cookie on every possible destination page the user can get to from the home page. Unfortunately, that's most of the site, and I'm still screwed if they follow a link off my site. So I would have to read the data back when the user visited again in the future. Not very useful if they opted not to return.

(continued)

Copyright © 2001
Last updated: 15 Jun 2001 17:02:14