Question

I just found a solution to one of the weirdest bug i have ever seen and i am still trying to find the reason ...

I got an old CMS in Classic ASP. In the editor page there's a JavaScript changing an image property:

function removeimg(objimg){
    objimg.onclick = "";
    objimg.src = "/Logiciel/_Altitude_image/interface/Gestion_acces/spacer.gif";
    objimg.width = 16;
    objimg.style.cursor = "arrow";
}

One of my client using IE6 told me that when she was saving her content in English it was overwriting her content in french, but the Language is saved in a Classic ASP session so I started to investigate the bug (none of my 200 other clients got that kind of problem) so after testing over and over again putting response.end in the code and response.write of my session to find out where it was changing I found out that it was in the javascript itself

This is the part I cant explain...I had to put objimg.style.cursor = "arrow"; in comment at first to realize that once that line was out there was no more problem with my ASP session.

Then after a few tests I changed objimg.style.cursor = "arrow"; to objimg.style.cursor = "pointer"; and it worked just fine. I was wondering if anyone got that kind of problem before, and if someone could explain to me how changing a cursor could affect my server side classic ASP session

Thank you.

Was it helpful?

Solution

It's a bug in IE: when it finds is given an invalid value, such as arrow, for the cursor property by a script (though not in CSS) it incorrectly treats it as if it were url(arrow) and attempts to fetch the image file named "arrow" that it believes it should be displaying. This additional HTTP request would send any cookies associated with the page from which it was made. The cookies would include the ASP Session identifier cookie, and presumably this unexpected and out-of-sequence request was somehow affecting your session-related code.

(By the way, if the cursor is supposed to be the usual arrow cursor, the correct value is default; pointer is the cursor associated with hovering over a link. But perhaps that's what was wanted in the first place.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top