Archive for the ‘HTML/JavaScript’ Category

Empty <A> tag behavior

Wednesday, January 28th, 2009

A client of ours was seeing a bug but we were not able to catch it. It was happening on a link for us and my developers and i were unclear on why this was happening. What was happening was we were looking at a page that was available after login in the admin, for example members.php. On this page there was a link called “Username” and its called looked like…

<a href=”">Username</a>

If you would click on the link from Firefox, it would load the members.php page again. If you had clicked the link from Internet Explorer 7 it was loading the root folder which was “admin/” causing it to look like we were getting logged out. After seeing this we relized its happening because Firefox and Internet Explorer have their own rules on what empty link tags should be doing and that just makes our job as developers even harder.