How many Tar Heel Reader users have Javascript disabled?

| tags: web

I'm redesigning Tar Heel Reader in hopes of taking load off the server and making the site friendlier to tablets and phones. Over the last few weeks I did a mockup with jQuery Mobile that works well enough on mobile devices but it was just kludged into the current system and it didn't work at all on IE6. So, I've decided to back up and rethink things.

One question that immediately came to mind was could I assume users would have Javascript enabled? A bit of searching on the web gave the estimate that 2% of US users have Javascript disabled but some people claim that number may be inflated by bots and such. If only I could sample our users I would have the number I really wanted.

I began to think about instrumenting the site to collect some statistics when I looked at the php code for rendering book pages. Incredibly, I had already encoded the information I needed into image URLs! I have no recollection of doing it but years ago when I wrote the code I added the query parameter ?noscript=1 to the images when they are loaded by a browser with Javascript turned off. I salute past me for the amazing foresight!

Some simple analysis of my Apache log files using zcat, grep, awk, sort, uniq, and wc in pipelines tells me that over the 9-week period from 18 September 2011 to 20 November 2011, 337 unique IP addresses read 67,532 book pages with Javascript disabled. During that period a total of 1,842,915 book pages were read so about 3.7% of the total had Javascript disabled. My other stats indicate about 27,000 books were read per week so they must have averaged about 7.6 pages per book.

To confirm this analysis I used Info Sniper to lookup a small sample of the IP addresses; they look like schools and homes, not bots. I also examined the user agents; again they looked reasonable for browsers includeing various versions of IE, Safari, and Firefox.

The bottom line is we've got to continue supporting readers with Javascript disabled. During a typical week almost 1000 books are read without Javascript. I don't want to shut out those children.