Donniel Thomas writes "Javascript isn't for the weak of heart or those short of patience. What works in one browser may not function properly, or result in a nasty JS error in another (*cough*IE*cough). Which is why I can understand what this programmer meant."

The following screenshot is from the homepage of Zillow.com, which is one of the most popular and AJAX-y Real-Estate sites on the web. And, as of this writing, the coder's plea still remains ...

 

UPDATE: A rare explanation from the coder! Jeff Lubetkin responded in the comments...

I am the author of this little snippet of joy. During the final frantic stages of getting Zillow out the door, a bug was discovered where if a certain DIV was completely empty, IE6 would crash. Hard. It was likely a combination of the DIV naming and the CSS being applied, but we didn't have days to waste tracking it down. In desperation, I added this comment to see if simply adding anything to the DIV would prevent the crash...and it worked. I suppose I could have been more cryptic, but as we all know it's important to future maintenance that any code be self-explanatory.

Given major changes to the DOM structure and CSS of the site, it's likely that this comment isn't even necessary anymore, but I've always liked the fact that I fixed a crashing bug with a comment. Plus, it got me on WorseThanFailure.com, and how many devs can say that?

Oh, and while the Javascript discussion above is interesting, keep in mind that this bug had nothing to do with scripting, but with the DOM and CSS in IE6. Even with no script at all on the page, it still crashed...

 

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!