Requirement for keeping the code valid after content transformation

We used to deliver websites as valid XHTML with the xhtml+xml mime type. 
However, some mobile carriers replace images with low quality images. If 
you click on an image there's the option to load the original image. 
That functionality is added with JavaScript. Now the JavaScript is 
appended after the original code, i.e. after </html>, without CDATA 
wraps. Of course that's a horrible thing and turns the page invalid. As 
Firefox interprets pages with that mime type as XML, a yellow error page 
appears instead of the intended (and valid) page. As a result 
regrettably we had to switch back to text/html.

I can understand that providers like to "optimize" the mobile 
experience. While users don't get informed or asked about the inferior 
image quality, they might even benefit from faster loading times. But 
I'd prefer if they kept their fingers from my valid code. Or if they 
really need to rewrite or append code, they should be required at least 
to keep it valid according to the DTD / XML Schema of the document.

I hope this common scenario helps to further shape requirements for 
negotiation between content owner/server, proxy, and user/browser, as 
well as introducing a minimum for quality assurance and keeping the code 
clean.

Cheers,
   Martin

Received on Wednesday, 16 April 2008 14:48:49 UTC