Took me a bit to figure this one out. I was trying to upgrade my image download bot so it could handle pages that link to images without extensions. It is unusual, but when it happens, it is very hard to tell the difference between a regular href link to another page and link to an image, they both look the same to the bot, obviously. I quickly realized I could use other link attributes to tell them appart, and so I started checking for the href title and processing it. Most surprisingly, it was returned blank every time. That seemed impossible, as I was looking at the page source and I could see each image title right there, and there were certainly not blank. After banging my head for a while, I started examining all the .js scripts the test webpage I had picked was using. It seemed bizarre that the scripts would be modifying a default attribute like title, but sure enough, they were. One of them was deleting the title attribute and replacing it with a custom one called "tiptitle" - that was the issue! See below the code responsible for this:
..
for (var i = 0; i < anchors.length; i ++)
{
a = anchors[i];
sTitle = a.getAttribute("title");
if(sTitle) {
a.setAttribute("tiptitle", sTitle);
a.removeAttribute("title");
...
...
Aha! And so, my bot handles this scenario just fine now.