Serving XHTML in a Zend Framework Application

      Comments Off on Serving XHTML in a Zend Framework Application

Serving XHTML is often misunderstood by php developers. Frontend engineers simply include the XHTML doctype to their documents, without actually serving document as XHTML. This triggers majority of the browsers to treat such pages as ‘tag-soup’.

If you really care for faster XHTML rendering, you can get its benefit by using content negotiation, thanks to the new controller plugin we have for you.

You should note, however, that your pages should be XHTML compliant and validate against XHTML validators like the one at w3.validator.org. Otherwise supporting browsers will display errors without no real content shown to users! If you are sure that your frontend designer is a good XHTML writer, then you should be safe (still, it never hurts to validate first).

Read more theory and the practical implementation (front controller plugin for Zend Framework) at Smartycode website