My name is
Jurgens du Toit.
Technology and Solving Problems are my passion. I'm a South African that loves my wife, life, and coding.
I'm writing a book!
I’m busy creating a site for a client who wants to know when certain internal links get clicked. Not a problem, I just insert a record into a table every time the links they want to know about get accesesd. Only problem is, when I check the table, I notice that every page impression gets logged twice.
Now, this happened before, where I also needed to implement some page tracking, and it ended up being an image or something with src=””, and Firefox interpreting it as the same location as the current page (as with form with action=””). Don’t know if that is according to standards, either way, it messes up my page tracking.
The simple solution is to find any images or HTML elements with source attributes that are empty. Only problem is I couldn’t find any this time. So, by taking out chunks of code, I eventually tracked it to srcover attributes in some of the images. Just as a side note, I don’t use srcover, the designers use them, and unfortunately I must make do with what the designers give me.
So why does Firefox (I didn’t test on other browser) do this on srcover? Firebug shows that the images specified in srcover are downloaded, and the mouseovers work, so it’s not that the images are missing or anything.
I’ll investigate when I have some time, and report back…
I found this page at Experts Exchange, but hey, they want me to pay to see it. No chance of that happening. If anyone is a member, and you don’t want money to share some wisdom, please do!
Update number two:
I fount this page which only talks about the empty src tag, but it also quotes the HTML spec that says that empty src tags refer to the same page their in. So why does srcover still re-request my page?
Update number final: