Chome预测服务,点击计数,Spring Boot

时间:2018-10-16 00:16:00

标签: google-chrome spring-boot prediction

我在使用谷歌浏览器预测服务和计算服务点击次数时遇到问题。在登台访问给定URL时,我们计算数据库中的访问次数。如果测试人员将网址粘贴10次到Chrome中,那么它将在数据库中记录15-18次访问。我检查了访问日志,Chrome确实发送了这么多请求。使用其他浏览器不会发生这种情况。 curl不会发生这种情况。当所有预测服务都关闭时,不会发生这种情况。我无法在PC上使用Chrome复制它,但是测试人员可以可靠地复制它。它们位于不同的网络上,并且可能具有不同的设置。在生产中不会发生。代码有很多更改,但是我看不到任何会影响Chrome发送请求的方式的内容。我使用的是Spring Boot,请求只是GET个请求。

如何阻止Chrome发送的请求超过用户在地址栏中输入或点击的次数?让用户进行设置更改是不切实际的。 Chrome正在查看哪些标题或数据,以决定是否针对每次页面访问发送多个请求?

Chrome prediction services

以下是当仅手动请求10个URL时Chrome发送的16个请求。有时,请求是在相同的确切时间,但仅在前4-5个之后。在完整日志中,即使在重定向或尝试获取重定向的URL之前,它也会显示2个相同的请求。

$ grep dsta13 /tmp/access.log
172.31.43.99 - - [15/Oct/2018:22:11:03 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:05 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:07 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:08 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:08 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:10 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:10 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:12 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:12 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:14 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:15 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:16 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:16 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:18 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:19 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"
172.31.43.99 - - [15/Oct/2018:22:11:20 +0000] "GET /dsta13 HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" "99.99.99.99"

0 个答案:

没有答案