-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么通常在发送数据埋点请求的时候使用的是 1x1 像素的透明 gif 图片? #84
Comments
|
既然是数据上报,那么这种方式是如何携带信息的呢? |
用需要上报的数据拼接成URL,将img的src形式替换为拼接的URL,new Image 对象设置SRC后立即发送请求。然后Nginx通过URL识别返回一像素gif图片,并处理数据。 |
图片这种上报方式统计pv uv或者少量的通用数据更合适一些 |
浏览器会缓存图片url地址,不会重复上报 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: