Question

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

I've noticed that all of these 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top