我在一个stat.js文件里依次包含2个请求
if (typeof (Image) == 'undefined') {
Image= new Image;
Image.src="http://www.a.com/a.ashx";
}if (typeof (ImageOld) == 'undefined') {
ImageOld= new Image;
ImageOld.src="http://www.b.com/b.ashx";
}a,b文件是一样的,我在test.html里部署
<script src="http://www.stat.com/js/stat.js"></script>
然后不停访问test.html
统计发现b.ashx比a.ashx数量要少10%
这算正常吗?
应该怎么避免?
if (typeof (Image) == 'undefined') {
Image= new Image;
Image.src="http://www.a.com/a.ashx";
}if (typeof (ImageOld) == 'undefined') {
ImageOld= new Image;
ImageOld.src="http://www.b.com/b.ashx";
}a,b文件是一样的,我在test.html里部署
<script src="http://www.stat.com/js/stat.js"></script>
然后不停访问test.html
统计发现b.ashx比a.ashx数量要少10%
这算正常吗?
应该怎么避免?
解决方案 »
- ajax 刷新问题
- JS调用后台方法
- 求助,ASP.NET下面用什么报表比较好?
- net2005,GridView控件内容保存文excel 的错误提示
- 框架刷新问题
- 该怎么对线程控制,让一个线程侦听100个Socket连接呢?
- 请教:用Potoshop处理图片发现保存时候提示非标准什么的字符,用看图片工具可以看到放到网页里面却不能显示不知道如何处理才能显示?
- 有人知道教室分配系统哪里有吗??给高分或者人民币,要c#版的。谢谢啊,不胜感激。
- 怎么配置vs.net才能进行asp.net的编程?????
- 狂急,急咨询Passport RPS技术?
- 关于数据库中的图片信息,添加ALT属性的问题
- 是否有自动生成表单的工具
我去查看iis日志
发现a.ashx的请求数比b.ashx的多8-9%多
只要有请求过去,我就会计数一次PV的
发现b.ashx的PV少,然后去查看IIS,IIS的请求数和程序记录的PV是对应的.
所以我怀疑是
if (typeof (ImageOld) == 'undefined') {
ImageOld= new Image;
ImageOld.src="http://www.b.com/b.ashx";
}
这个因为排在下面,有可能没有被执行,页面就关了
但是也不至于相差近10%了。