Currently, I have a page tracking system that uses $.post(PAIRS-DATA) in JavaScript to send collected information back to the server and load 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 issue is that $.post(PAIRS-DATA) is being canceled in Chrome due to cross-domain restrictions. To address this, I attempted
$.ajax({
type: "POST",
dataType: "jsonp",
jsonp: false,
processData: false,
crossDomain: true,
url: "URL",
data: dataPairs
});
While this fixes the cross-domain problem, it now results in "Resource interpreted as Script but transferred with MIME type image/gif:"
How can I resolve this? Is there an issue with the $.ajax call?