[英]How to know what percentage of visitors to a website don't use javascript?
有没有一种简单的方法可以找出网页访问者中没有使用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. 大多数现代分析程序都会为您执行此操作,但是......您可以使用标记和1x1 gif并计算日志文件中的命中数。
<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. 如果这是一个高使用率的图像,你可能会遇到代理缓存的问题,但怀疑没有javascript的人很少,这不会是一个问题。
Mike 麦克风
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.