Custom Doctype and Domino rendered HTML pages - working solution

Here we go :

http://darkmag.net/darkBlog/index.php/2004/01/06/4-GenerationDePagesWebLotusNotesConformesAuxStandardsDuW3c

Written in french, but should be easy to understand thanks to pictures and logs.

enjoy !

Subject: PLEASE dont do this

The technique described in the link is NOT SUPPORTED.- there is no guarantee that this will continue to work in future releases

  • it can have undesirable side effects (the now commented out ETAG is used for cache control)

  • the fact that @SetHTTPHeader allows you to break out of headers and into content is really a BUG and is likely to be disallowed in future releases.

Subject: RE: PLEASE dont do this

The technique described in the link is NOT SUPPORTED.

Indeed, that is not supported. So what ? if were only able to do what’s supported, it would be clearly limited…

  • there is no guarantee that this will continue to work in future releases

That’s right. But as seen in Lotus Workplace Tour 2003, IBM is supposed to support web standards in the future releases, so that we can expect natively doctype choice in Domino R7. And, consequently, you just would have to remove the first computed text in each page/form to disable the trick. 30 mins.

  • it can have undesirable side effects (the now commented out ETAG is used for cache control)

That’s indeed THE bad side of the trick. But there’s still client caching, and lots of web sites work very well without server-side caching.

  • the fact that @SetHTTPHeader allows you to break out of headers and into content is really a BUG and is likely to be disallowed in future releases.

It might be disallowed in future releases, but as they are supposed to allow you to do it natively, that’s not a problem.

Don’t forget that this trick just does one thing : it changes the doctype of the page/form, to switch your browser in standard-compliance mode. Nothing more. Even if you remove it, your web application will still work. The UI won’t behave in the same way, that’s all.

What do you prefer ? building now a web application in standard-compliance mode, which have few chances to have to be used in quirks mode, if ever IBM wouldn’t support standards in future releases - and that’s not what they planned, or building now a web application in quirks mode, which will only work for Internet Explorer and that you will have to completly redesign when most of people will use a fully standard compliant browser (mozilla, safari, camino, and even IE6 [almost fully compliant])), in few months/years ?

Don’t forget that in few weeks, MS won’t support IE 5.0 and 5.5 anymore. Quirks mode is dead. Your web applications built in that mode too. Domino R7, wich will support web standards, is coming out in september 2004. That’s why i think that’s not a good strategy to support quirks mode as you suggest.

Subject: RE: PLEASE dont do this

[And, consequently, you just would have to remove the first computed text
in each page/form to disable the trick. 30 mins.
]

If you believe that any corporate web development group would actually go back
upon the release of a new Domino version and modify their code en masse to undo
this hack, you haven’t been around much.

It’s a cool hack, no doubt. But any hack that is dependent on a known bug is
self-defeating. This is like using the 6.0.1 bug of NotesDocument.LastModified
returning the timestamp for the particular replica – super-useful if that’s
what you’re after, but completely fragile because it’s dependent on a known and
obvious bug. That’s never a good development strategy for the real world.