Home
> Uncategorized > Generating a 1×1 pixel jpeg in a aspx page
Generating a 1×1 pixel jpeg in a aspx page
I was looking at a way to track website referers using aspx, and to my horror, I found that Request.ServerVariables["HTTP_REFERER"] was blank under many circumstances. However the javascript equivalent , document.referrer works much more reliably. However, ths javascript variable is only available after the page has loaded. So it needs to do a round-trip to the server to store this variable, without distracting the user by refreshing the page. There are a number ways to do this (a) hidden IFrame (b) out of band calls using XMLHTTP (c) aspx image tag Option C., was what I decided to go for…
Categories: Uncategorized
Comments (0)
Trackbacks (0)
Leave a comment
Trackback