为什么 Google Analytic 要求提供 GIF 文件? [英] Why does Google Analytic request a GIF file?

查看:25
本文介绍了为什么 Google Analytic 要求提供 GIF 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么 Google Analytic 要求提供 GIF 文件?

Why does Google Analytic request a GIF file?

是不是因为 GIF 比单独的 JavaScript 允许访问更多的数据.是获取用户的IP地址吗?

Is it because the GIF allows access to more data than JavaScript alone. Is it to get the IP address of the user?

推荐答案

即使启用了 JavaScript,analytics 也会请求 GIF 文件.如果你查看图像的 GET 参数,它包含了很多关于浏览器的信息.诸如 utmsr=1280x1024(屏幕尺寸)之类的东西.Google 代码有一个参数列表.

Even with JavaScript enabled, analytics requests a GIF file. If you look at the GET params of the image, it contains a lot of information about the browser. Stuff like utmsr=1280x1024 (the screen size). Google Code has a list of parameters.

它使用图像请求发送有关浏览器的信息,而无需 XMLHttpRequest.

It uses the image request to send information about the browser without an XMLHttpRequest.

现在,为了真正回答最初的问题,谷歌可能这样做是为了绕过跨域XMLHttpRequest 限制.

Now, to actually answer the original question, Google is probably doing this to get around cross-domain XMLHttpRequest restrictions.

这篇关于为什么 Google Analytic 要求提供 GIF 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆