Cross-site content service - JSONP, iframe, or something else?

I am creating an ad network. This entails third-party sites, including my javascript, and then replacing the divs that they set with my content.

We need to dynamically determine how much of the content will be used in these divs, so this requires a cross-site call. AFAIK popular ways to do this are JSONP and iFrame. What are the pros and cons of each approach? In particular, I'm interested in:

  • Browser compatible
  • End user performance
  • Tracking Ad Performance
  • Resistance to third-party site interference (i.e. fake clicks)
  • What existing ad networks are using

If there are other technologies, they would also like to know about them.

EDIT: after some research, another option seems to be an image tag that redirects 302 so the server can select the image dynamically.

+4
source share
1 answer

Another option is to implement CORS on the yiur server, but it only works with modern browsers, so this is not suitable for you.

+1
source

Source: https://habr.com/ru/post/1415355/


All Articles