我是否有充分的理由不应该对回旋镖执行此操作:
<script type="text/javascript">
if (Math.random() < 0.005) {//one time in 200
document.write(
'<scr' + 'ipt src="/scripts/boomerang.js" type="text/javascript"></scr' + 'ipt>' +
'<scr' + 'ipt type="text/javascript">BOOMR.init({'+
'user_ip: "'+ '<%= Request.UserHostAddress %>' +'",'+
'site_domain: "' + '<%= //TODO from config%>' + '",' +
'beacon_url: "/Handlers/Boomerang.ashx",'+
'BW: {base_url: "/Resources/images/Boomerang/"}'
+'});</scr' + 'ipt>'
);
}
else if (Math.random() < 0.1) {//one time in ten
document.write(
'<scr' + 'ipt src="/scripts/boomerang.js" type="text/javascript"></scr' + 'ipt>' +
'<scr' + 'ipt type="text/javascript">BOOMR.init({'+
'user_ip: "'+ '<%= Request.UserHostAddress %>' +'",'+
'site_domain: "' + '<%= //TODO from config%>' + '",' +
'beacon_url: "/Handlers/Boomerang.ashx",'+
'BW : { enabled : false }'+
'});</scr' + 'ipt>'
);
}
</script>
这会使返回的时间无效吗?
我们不太关心使用多页方法获取结果:我们满足于只从计时 api 接收结果。