Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: incrediBILL
If you were to stand on the street corner all day and asked everyone that went by, what would the answer be...? Hhhmmm...
I've never actually met anyone who isn't 'JS enabled' - what do they look like? I have a strong suspicion that they are in fact other web developers, who have been testing their site for 'accessibility' and have forgotten that they've disabled the JS in their browser before trundling around the net wondering why other sites aren't working properly?!
Issue #161 of .net mag recons that between 5 and 10% of internet users don't have JS enabled - yet it says it got it's information from [thecounter.com...] which gives a global non-JS figure of 4%. (That's still a lot of "users")
If you're okay with sharing your site's data with Google, their Analytics program everything you've mentioned and its free.
For your own site, you can calculate the statistic yourself by putting this code into your footer or header so it gets included on every page. The image itself doesn't matter. A 1-pixel gif will do. Just make 2 copies. Since the images are requested by the user's browser, it will not be retrieved by robots or scrapers, making your statistics even better.
Every page request results in a call to the first image. The second image is only requested when the user has JS disabled:
Tabulate the result using your site access logs.
This page [w3schools.com...] makes it appear that assuming a 10% JS-off rate wouldn't be too bad a guess.
[edited by: SteveWh at 7:22 am (utc) on Mar. 13, 2007]
So unless you are being extremely rigorous in filtering out bot traffic from your data, the numbers you get will not accurately reflect human visitors with js turned off -- and that's what you care about.
[edited by: tedster at 9:36 am (utc) on Mar. 13, 2007]
...was unable to think of any method by which their JS code could detect when it wasn't being run
I thought of a method, and tested it, with this result:
the browser DOES issue a request for the file, even if scripting is disabled.
So Google has an easy way to determine that their .js file WAS retrieved but WASN'T run.
I've never actually met anyone who isn't 'JS enabled' - what do they look like?
They are out there, and growing in number. :-)
Actually, I wonder if there is an extension for Firefox that lets you whitelist sites where scripting is allowed?
As a postscript, I did this experiment many times over about an hour. The very first time I had JS off, IE7 did request the JS file. That's what I based my above post on, and it does at least prove that the file can be requested when JS is off. However, it never did it again, even when I deleted the JS file from my browser cache. It could nonetheless have been some sort of browser cache thing, but basically after that first access, I couldn't replicate the result. So I consider the question still somewhat open, having been unable to get consistent repeatable results.
Firefox never caused the JS file to be requested when scripting was disabled.
So if you really want to know, it might require more testing on your own. Turn off JS, load the page, check your site log, and repeat until you're really tired of it...