This was going to be another Domino sucks posts, but has since turned in to praise for Domino.
When I first tried to plug in the IE Behavior I mentioned yesterday it didn't work. After looking for all the obvious mistakes I looked for the less obvious. First off, what mime-type IE expected for the .HTC file. Using HTTPWatch I looked at what mime-type the working MSDN demo page used:
The .htc file was sent as text/x-component. In my Domino database I'd added it as a File Resource and it was sent to IE as application/octet-stream, like below:
This is where I cursed Domino. Why can't I send the file in my own mime-type!? To get the Behavior working I pasted its content in to a Page and set the mime-type in its properties. This post was then going to be a lambasting of Notes and a suggestion that the File Resource object allow you to set the mime-type. Lucky for me I checked whether you can actually do this. You can. I'd just assumed you couldn't. For each File Resource there's the following property:
You can take it one step further and make the server recognise the .htc file extension as a Behaviour and always send it as text/x-component. Open your Domino Directory and find the File Identification view. Add a new document, like below:
So, Domino ain't all bad and I deserve a slapped wrist for continually thinking so little of it. In fact, as it turned out, the problem with the Behavior wasn't even that it had the wrong mime-type. Despite all this I think knowing about mime-types is always good. I guess most of you knew about being able to change mime-types of File Resources?
Browsers based on Mozilla don't like CSS being sent to them with anything other than the text/css mime-type. There are other files like this. XML/XSL is especially funny about it. Worth noting.