I am have page tracking / tracking pixel page that is currently using $.post(PAIRS-DATA) to post the information being collected in the JavaScript back to the server. Then finally loads as a tracking pixel.
finally
{
//tracking pixel
Response.ContentType = "image/gif";
byte[] buffer = pix.BinaryData;
int len = buffer.Length;
Response.OutputStream.Write(buffer, 0, len);
}
The problem is, $.post(PAIRS-DATA) is canceled in Chrome, because it's cross domain. So I tried
$.ajax({
type: "POST",
dataType: "jsonp",
jsonp: false,
processData: false,
crossDomain: true,
url: "URL",
data: dataPairs
});
This take care of the cross domain issue but I now get "Resource interpreted as Script but transferred with MIME type image/gif:"
How can I fix this? is there something wrong with the $.ajax call?