If HTTP is used, the file extension does not make sense. The only information that matters to it is the Content-Type header field , where is the type of resource media.
But when servicing from the local file system, the type of medium is usually determined by the file extension.
Edit I think the reason is why the .html extension is used, even if its XHTML is because XHTML is HTML only with XML syntax, and all are used for .html HTML documents. (Although most XHTML documents are actually used as HTML, as text like text / html means HTML no matter what the document type declaration says.)
But again: when requesting via HTTP, extensions are not needed. The HTTP Content-Type header field indicates which media type the resource should interpret. Therefore, theoretically, you can use any extension you want, or even not use the extension at all (useful when content negotiation is used).
Gumbo
source share