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…
Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: