开发者

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

开发者 https://www.devze.com 2022-12-08 11:49 出处:网络
Is there an easy way to开发者_开发问答 find out what percentage of visitors to a webpage are not using javascript?If you want to do it yourself try this:

Is there an easy way to开发者_开发问答 find out what percentage of visitors to a webpage are not using javascript?


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>


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

0

精彩评论

暂无评论...
验证码 换一张
取 消