Patch to make 404 pages etc and autoindex pages use valid HTML

Maxim Dounin mdounin at mdounin.ru
Mon Dec 10 17:35:23 UTC 2018


Hello!

On Thu, Dec 06, 2018 at 06:42:23AM -0500, Andras Farkas wrote:

> On Wed, Nov 28, 2018 at 11:31 AM Maxim Dounin <mdounin at mdounin.ru> wrote:
> > Such a change will significantly modify typical rendering of error
> > pages, so I would rather refrain from it unless there are more
> > practical reasons than triggering standards-complaint mode instead
> > of quirks mode - which does no seem to make any difference for
> > pages nginx generates.
> Is having it render differently a bad thing?  The meaning of any page
> changed still remains clear and easy to read.  Invalid HTML (like
> <center>) is so easy to remove and to turn into valid HTML, I don't
> see why not to.

Well, it renders as it is now to make reading of error pages 
easier.  While changing rendering is certainly possible, this is 
something usually justified by better rendering, not just 
by switching to standards mode instead of quirks mode.

Note well that the "<center>" tag is valid HTML 3.2 tag.  While it 
was removed in HTML 5, it does not make it "invalid HTML".  We can 
even make returned HTML perfectly valid by explicitly returning 
appropriate DOCTYPE (yet again there are no practical reasons to 
do so, and this will make error pages bigger).

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list