16

Best ad ever.

Comments
  • 3
    I would love an ad that was a code puzzle.
  • 2
    It's not an ad. This is actually pretty common.

    It's a tracking pixel. They serve a 1x1 pixel gif (smaller file than jpg/png) from (usually) a php script. The script takes your IP, User Agent, Referrer (url of page containing that image), possibly cookies, and anything else it gets from HTTP request headers and then saves that to a db/flat file before responding to the request with the correct mimetype, and a few bytes for a valid 1x1 transparent .gif.

    It's a lot easier to get someone to server content with an image tag that has a src pointing to your endpoint than it is to, say, inject an iframe or some js that does a XHR request to tell your server that.

    You can use this on a ton of sites that serve user-generated content. GitHub is one of them!. You could add some markdown/bbcode to your page that looks like this:

    ![](http://my-server.com/tracking-pixel...)

    and the second user loads the page, a request is made to my server and I now just collected some data on yah.
  • 2
    This was actually a screenshot taken from inside an android app. It says advertisement over it. I think the ad failed at loading or something. I'm no expert but that also looks pretty interesting.
  • 2
    @kevbost I think google did a code puzzle as part of a job ad.
Add Comment