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

查看:83
本文介绍了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,分析也会请求一个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.

现在,为了真正回答原始问题,Google可能会这样做,以避开跨域 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天全站免登陆