Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know what percentage of visitors to a website don't use javascript?

Is there an easy way to find out what percentage of visitors to a webpage are not using javascript?

like image 523
chris Avatar asked Dec 04 '25 00:12

chris


2 Answers

If you want to do it yourself try this:

<noscript><img src="countNoJS.php" style="display:none" /></noscript>
<script>document.write('<img src="countJS.php" style="display:none" />');</script>
like image 96
jantimon Avatar answered Dec 05 '25 13:12

jantimon


Most of the more modern analytic programs will do this for you but ... you can use the tag and a 1x1 gif and count the hits in the log files.

<noscript>
<img src="http://www.mysite.com/assets/images/no_javascript_1x1.gif" alt="" width="1" height="1" border="0" />
</noscript>

or for secure pages:

<noscript>
  <img src="https://www.mysite.com/assets/images/no_javascript_1x1.gif" alt="no javascript marker" width="1" height="1" border="0" />
</noscript

If this was a high use image you could have an issue with proxy caching but suspect there are so few people with no javascript , this will not be an issue.

Mike

like image 44
MikeyB_Leeds Avatar answered Dec 05 '25 12:12

MikeyB_Leeds



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!