简体   繁体   English

如何知道网站访问者的百分比不使用javascript?

[英]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.

相关问题 如何将此 github 的内容实施到我的网站中? 我不太了解 javascript - How do I implement contents of this github into my website? I don't know much about javascript 不知道如何在vuejs中使用emailjs - Don’t know how to use emailjs with vuejs 不知道如何使用.toggle() - Don't know how to use .toggle() 不知道我的 IF 语句有什么问题(JAVASCRIPT) - Don't know what's wrong with my IF statement (JAVASCRIPT) 如果我不知道深度是多少,如何动态处理Javascript中的嵌套对象? - How to dynamically process nested object in Javascript if I don't know what is the depth? 如何知道在网站或html页面的某些特定部分使用了什么JavaScript或jquery? - How to know what JavaScript or jquery use in the some specific part of the website or html page? 我的Javascript不起作用。不知道它是函数,我是如何调用它,我使用的CSS或者是什么 - My Javascript doesn't work. Don't know if it's the Function, how I'm calling it, the CSS I used or what 如何使用JavaScript计算网站访问者的数量? - How can I count the number of the visitors on my website using JavaScript? 如何阻止我网站上所有禁用javascript的用户/访问者? - How to block all users/visitors in my website that disable javascript? 我不知道如何在JavaScript中创建额外的轨道圆 - I don't know how to create an extra orbiting circle in JavaScript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM