Is it possible to detect a response HTTP 302(moved) while loading an image from JavaScript?
We use a simple DART banner image that redirects a request to show the actual ad. srcthe image points to the DART server, but if you check the request-response message, you will see that a redirection is occurring:
curl -LI "http://ad.doubleclick.net/ad/mycompany.com/main;sz=320x50;ord=9524078512356?"
HTTP/1.1 302 Moved Temporarily
Content-Length: 0
Location: http://s0.2mdn.net/viewad/12345678/actual_creative.jpg
Content-Type: text/html
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 6811
In the end, I want to be able to define a string actual_creative.jpg. This is only needed to work in Mobile Safari, so I hope that there is an event listener that I can use to monitor the load at a very low level.
source
share