Browsing Posts in Microsoft

O! man... Everynow and again I come across something and think to myself; WHY. Today it was .mht files. Concept is good, a proprietary format for saving webmail, but why !? I guess it kinda' works, but with all the Javascript, the images, the CSS. Man.

Anyway, I was looking for an extension for opening this in Firefox (I hate IE) and came across this, incase anyone comes across this whist Googlin' for an MHT plugin; here it is

... another Microsoft 'feature'. This time though it's proved pretty useful and at a quick glance looks to be a pretty powerful language subset. To quote the Wiki "... (HTCs) are a nonstandard mechanism to implement components in script as Dynamic HTML (DHTML) "behaviors" in the "Microsoft Internet Explorer" web browser..."

For most people like me HTC has probably been limited to Angus Turnball's most excellent IE PNG Fix helping millions solve that annoying CSS problem of no alpha transparency support for PNG's in older versions of IE.

Whilst doing a favor for a friend and giving his website some spit and polish I decided to utilize PNG's alot to achieve some nice 'Apple-esk' aesthetics. Naturally this could potentially lead to some head-splitting CSS issues, but thanks to the PNG fix wonder fix it's a cake walk. Anyway, as these things do, it started me on an internet surfing tangent to try and find out a little about the humble HTC file.

Basically it's a bunch of script that can be executed as a component when assigned to the DOM and there are several ways of assigning it. By adding a 'behaviour'. Typically this is in the form of Microsoft's behaviour: CSS attribute. i.e. <LI STYLE="behavior:url(">Foo Bar</LI>, which gets me thinking; who came up with Foo Bar !?

BUT, there are other ways of implementing behaviours. Using Javascript is another example (admitedly this is a Microsoft JS feature only, but seeing how this only affects IE anyway !). addBehavior(); and there a bunchof other features too. Much like Microsoft DXImage filters though progid:DXImageTransform.Microsoft.Alpha(sProperties) it will probably fall by the wayside, used only on occasion to, ironically, correct non-standard CSS rendering issues in IE