Random Thoughts
Saturday, May 30, 2009
IE6 DOM weirdness: It was the base and not the comma
I recently hacked a few lines of JavaScript for an online survey. The script looked fairly straightforward and worked well on Firefox in no time.
Fortunately I had just received a new ThinkPad (more about that later) and hadn't upgraded Internet Explorer yet. Testing with IE6, my code failed miserably. Debugging with the indispensable FireBug light tool revealed that a shared library function for accessing meta information didn't return any information. The very same library function was working nicely on the production Web site, though; at least we hadn't heard any complaints, which given the percentage of users accessing our Web site with IE6 was highly unlikely.
Staring at the screen in disbelieve, our resident jQuery guru eventually found the culprit. Unlike with the infamous Undefined is null or not an object problem, it was not an issue with an extra comma this time.
Rather, IE6 seems to get the structure of documents containing a

into this DOM tree:

So the selector which was correctly looking for
Related information:
Fortunately I had just received a new ThinkPad (more about that later) and hadn't upgraded Internet Explorer yet. Testing with IE6, my code failed miserably. Debugging with the indispensable FireBug light tool revealed that a shared library function for accessing meta information didn't return any information. The very same library function was working nicely on the production Web site, though; at least we hadn't heard any complaints, which given the percentage of users accessing our Web site with IE6 was highly unlikely.
Staring at the screen in disbelieve, our resident jQuery guru eventually found the culprit. Unlike with the infamous Undefined is null or not an object problem, it was not an issue with an extra comma this time.
Rather, IE6 seems to get the structure of documents containing a
base tag wrong, making subsequent meta and link elements children of the base element, turning this source
into this DOM tree:

So the selector which was correctly looking for
html > meta would fail in the rare presence of a base tag, such as on a test page created by yours truly. The quick fix was a slightly less efficient selector html meta, and we were once again painfully reminded that IE6 tends to behave differently from current browsers and requires separate testing.Related information:
- Justin Rogers, BASE tag changes in IE 7 with Examples
Labels: javascript, webdevelopment, windows
Sunday, March 22, 2009
rsync does work with plink
For years rsync from the cygwin distribution and PuTTY's plink program would not work together and fail with
Unable to read from standard input: The handle is invalid.
rsync: read error: Connection reset by peer (104)
I first posted this problem to comp.security.ssh in 2005 but never received a solution, until now.
Frank Behrens published cygnative, a small wrapper program that resolves an incompatibility between cygwin and Win32 native programs. With cygnative, invoking rsync with plink as the remote shell works like a charm:
rsync -ave "cygnative plink -batch" source target
Thank you, Frank!
Unable to read from standard input: The handle is invalid.
rsync: read error: Connection reset by peer (104)
I first posted this problem to comp.security.ssh in 2005 but never received a solution, until now.
Frank Behrens published cygnative, a small wrapper program that resolves an incompatibility between cygwin and Win32 native programs. With cygnative, invoking rsync with plink as the remote shell works like a charm:
rsync -ave "cygnative plink -batch" source target
Thank you, Frank!
Labels: networking, windows
Thursday, July 10, 2008
Microsoft DNS patch KB951748 secures Internet access too well
The latest Microsoft DNS patch improves security too well. The update appears to be incompatible with Check Point's hugely popular ZoneAlarm firewall and possibly other firewall products, and results in complete loss of Internet access.
After a lengthy failed attempt to diagnose a family member's “my Internet no longer works” problem over the phone I saw the BugTraq alert “Microsoft DNS patch KB951748 incompatible with Zonealarm” late at night. Sure enough, uninstalling the update nicely resolved the problem.
The other possible workaround, turning off the firewall completely, would be more risky than living with the spoofing vulnerability until this incompatibilty gets fixed.
After a lengthy failed attempt to diagnose a family member's “my Internet no longer works” problem over the phone I saw the BugTraq alert “Microsoft DNS patch KB951748 incompatible with Zonealarm” late at night. Sure enough, uninstalling the update nicely resolved the problem.
The other possible workaround, turning off the firewall completely, would be more risky than living with the spoofing vulnerability until this incompatibilty gets fixed.
Labels: technology, windows
Friday, June 20, 2008
Firefox 3
The Mozilla project released Firefox 3 on June 17 with an attempt to set the world record in software downloads per day.

While I consider raw traffic numbers only mildly useful and the hunt for traffic records somewhat old-fashioned (when IBM did run the Olympics Websites we would report record traffic numbers, and with the technology available back then the numbers were impressive, but that was in the 1990ies) I gladly did my part to set the world record. I mean, how often do you get a chance to be part of a world record, even if your contribution is only 1/8290545.
I even installed Firefox 3 :-) and for most parts have been satisfied with the result. The only complaint I have is that the installation overwrote the previously installed Firefox 2 despite placing the new version in a different directory, and sure enough some extensions were considered incompatible and therefore disabled.
Multiple Internet Explorer versions can coexist on the same machine thanks to the wonderful Multiple IE installer, can we please get an easy and automated way to run multiple versions of Firefox without fiddling with profiles?

While I consider raw traffic numbers only mildly useful and the hunt for traffic records somewhat old-fashioned (when IBM did run the Olympics Websites we would report record traffic numbers, and with the technology available back then the numbers were impressive, but that was in the 1990ies) I gladly did my part to set the world record. I mean, how often do you get a chance to be part of a world record, even if your contribution is only 1/8290545.
I even installed Firefox 3 :-) and for most parts have been satisfied with the result. The only complaint I have is that the installation overwrote the previously installed Firefox 2 despite placing the new version in a different directory, and sure enough some extensions were considered incompatible and therefore disabled.
Multiple Internet Explorer versions can coexist on the same machine thanks to the wonderful Multiple IE installer, can we please get an easy and automated way to run multiple versions of Firefox without fiddling with profiles?
Labels: technology, webdevelopment, windows
Thursday, April 24, 2008
PowerPoint: No comma, please
A colleague recently showed me a strange problem with Microsoft Office: When inserting a hyperlink in a PowerPoint presentation, one of the available options is linking to another page in the same document:

This seemed to work nicely for most slides but not for the particular slide he was trying to link to, and PowerPoint would not even show a preview in the hyperlink dialog box:

The programmer in me quickly scanned through the slide looking for “suspicious” elements, the only thing that caught my attention though was an innocent looking comma.
Turns out the comma is indeed the culprit, and the bug is well-documented in the Microsoft knowledge base: The hyperlink to a slide does not work when a comma is contained in the title of a slide presentation in PowerPoint.
Removing the comma, placing the hyperlink and then adding the comma back does seem to do the trick. Or, just don't use a comma.

This seemed to work nicely for most slides but not for the particular slide he was trying to link to, and PowerPoint would not even show a preview in the hyperlink dialog box:

The programmer in me quickly scanned through the slide looking for “suspicious” elements, the only thing that caught my attention though was an innocent looking comma.
Turns out the comma is indeed the culprit, and the bug is well-documented in the Microsoft knowledge base: The hyperlink to a slide does not work when a comma is contained in the title of a slide presentation in PowerPoint.
Removing the comma, placing the hyperlink and then adding the comma back does seem to do the trick. Or, just don't use a comma.
Labels: technology, windows
Tuesday, August 7, 2007
PHONETIC.FON
The amazon.de Web site has had a problem which has bothered me for some time: The search field on the homepage rendered at about half the usual height and text appeared invisible or white on white, so it was impossible to see text:

It wasn't that bad, I am a pretty solid typer and got the search terms right without seeing what I was typing, most of the time; still an inconvenience when trying to modify a search term, especially when the site starting redirecting search responses to addresses that no longer contain the search term, but not bad enough to spend time figuring out what was causing this.
Today one of my colleagues mentioned that he had found a solution to the problem: the PHONETIC.FON file seems to be the culprit, and indeed renaming that file has solved the problem nicely:

(A quick search for PHONETIC.FON sure enough turned up a page Why Do My Fonts in Netscape Navigator Look Funny? in the Netscape Unofficial FAQs.)

It wasn't that bad, I am a pretty solid typer and got the search terms right without seeing what I was typing, most of the time; still an inconvenience when trying to modify a search term, especially when the site starting redirecting search responses to addresses that no longer contain the search term, but not bad enough to spend time figuring out what was causing this.
Today one of my colleagues mentioned that he had found a solution to the problem: the PHONETIC.FON file seems to be the culprit, and indeed renaming that file has solved the problem nicely:

(A quick search for PHONETIC.FON sure enough turned up a page Why Do My Fonts in Netscape Navigator Look Funny? in the Netscape Unofficial FAQs.)
Labels: technology, webdevelopment, windows