开发者

Why do Web Analytics Applications Never Use JSONP

开发者 https://www.devze.com 2023-03-06 11:50 出处:网络
I\'m thinking of building an application for myself that is similar to Google Analytics, Getclicky, etc.

I'm thinking of building an application for myself that is similar to Google Analytics, Getclicky, etc.

I've noticed that all of the开发者_运维百科se websites use Image beacons to send data to the servers.

Aside from the size overhead, is there any reason to not use JSONP using jQuery?


JSONP is great when you want a response with meaningful data. In the case of analytics you dont care about the result. The easiest fastest and simplest way to send a GET request to a remote server is by requesting an image. And if you don't care what the response is, then anything else is needless complexity.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号