[Yanel-dev] should new pages' URLs end with ".xhtml" or ".html"?
Guillaume Déflache
guillaume.deflache at wyona.com
Wed Apr 22 16:10:00 CEST 2009
Hi!
Michael Wechner schrieb:
> Guillaume Déflache schrieb:
>> Hi!
>>
>> When creating the new "Features" page (
>> http://yanel.org/en/features.html ) I saw that many pages in the Yanel
>> website have both "*.xhtml" and "*.html" URLs(*)(**) (they use two
>> entries in the repo's "paths" directory).
>>
>> Why is that? It looks like we had to do that at some point to be
>> crawled by some tool that did not grok MIME-types but only use
>> extensions: is that the reason?
>
> IIRC Internet Explorer had some issues with xhtml suffix and xhtml mime
Fair enough for the MIME-type as it has never been handled correctly so
far by any IE AFAIK. See in particular
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=4787
Do you remember any specific issue with the "xhtml" suffix? I doubt
something gets triggered IE depending on an ".xhtml" extension given
that it does not support XHTML at all, but you never know! ;) There may
be issues with IE content sniffing though if we are serving XHTML
content as HTML, but that's another problem.
> type and also people expect an html suffix.
IMHO "normal" people don't expect anything in that respect and just
don't care, we as programmers *might* (now you know I don't! ;) ).
> But to make clear internally that this is really xhtml we added the
> xhtml suffix.
I again don't think it's so important to know that here.
I'd rather have a meaningful extension in the content repo corresponding
the content original MIME-type (but this would probably be a pain to
implement that, so let's forget that! ;) )
Granted all this is pretty minor but I'd rather have to add two mappings
each time I have to create a new page! :)
>> This may well be an issue if we want to move away from a VFS repo impl
>> using path-mapping to something simpler for the website ( see
>> http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=6940 ) as
>> then we would probably get two copies of the same content in "*.xhtml"
>> and "*.html" files...
>
> if we migrate to VFS, then we need to rename the xhtml to html, but
> don't worry about this, because it will be done automatically anyway,
> because only what the map contains is important
Sure, but the very problem is that the map itself contains both ".xhtml"
and ".html" mappings, so I do not see how it is not going to generate
duplicates, as would for example happen during a copy of directory with
two symlinks pointing to the same file in a filesystem not "seeing"
symbolic links but only what they point to (java.io.File API comes to
mind...).
But anyway I probably don't get/remember how the repo import/export works.
>> (*): There are even some odder mappings, like both
>> "acknowledgements.html.txt" and "acknowledgements.html" (plain text
>> document).
>
> this is, because it's based on Wiki syntax
OK.
>> (**): IMHO we should really use no extension at all for pages as we
>> seem to use MIME-types correctly internally, but anyway...
>
> I think extensions make a lot of sense still, because it gives a quick
> clue what the mime type could be.
Well, I would argue that in that part of the repo we do not really care
and it may be misleading and/or "incorrect", as the magic ultimately
happens elsewhere e.g. in the resource-configs.
Cheers,
Guillaume
More information about the Yanel-development
mailing list