[xmonad] Re: Home page redesign

Isaac Dupree isaacdupree at charter.net
Tue Jul 8 07:33:26 EDT 2008


Also, here's something that xmonad.org really ought to do too: don't 
serve filename extensions!  http://xmonad.org/contrib.html should be 
http://xmonad.org/contrib , and the link on the front page should go to 
that... because what if we decide to change the content-type?-- and what 
do users care what type it is in their minds and bookmarks?-- there is 
nothing inherently html about the file, and it makes it harder to use 
another file extension like xhtml to tell Apache that it's xhtml.  For 
Apache, I put in the top of my website 
<http://isaac.cedarswampstudios.org/> a .htaccess with:
Options MultiViews
DirectoryIndex index

Jeremy Shaw wrote:
>> Most of the other "problems" with xhtml are more like common pitfalls 
>> for document writers who don't understand the differences between html 
>> and xhtml and don't test their documents thoroughly.
> 
> Right. I believe my main argument is really comes down to:
> 
>  "Why use XHTML if you aren't really going to use it?"
> 
> It is my understanding that if you are not setting the HTTP Header,
> Content-Type: application/xhtml+xml, then absolutely nothing you put
> *in* the document will cause the browser to use the XHTML engine
> instead of the HTML engine.

Obviously if you serve XHTML you use Content-Type: application/xhtml+xml 
!--(well, at least you've argued effectively that serving something with 
DOCTYPE XHTML but Content-Type html is stupid.)  I do it with my 
website, XHTML 1.0 Strict, application/xhtml+xml, in UTF-8.  HTML syntax 
is confusing, since I know XML, and it's easy to catch my mistakes with 
a validator, and IIRC its default charset isn't UTF?.  I don't care 
about IE, I just tell my friends to use Firefox... although it seems 
alright to use hacks to serve it as text/html to IE if necessary, 
because IE is broken anyway (IIRC its Accept: is rather implausible anyway).

Also, even if HTML5 is the future, it sounds there is "XHTML5" to go 
with it so I can keep writing non-confusing web pages.  There is not 
only one future.  (Also, at the time I started it, it was less obvious 
that "XHTML > HTML" was a mostly dead idea.)

As for the issue of putting non-well-formed XML content into your 
webpages because it's automatically generated: that's a bad idea!  If 
your tools are broken enough that they don't always generate well-formed 
XML (let alone valid!), or if you want to allow your users to serve 
broken content, it needn't break your page -- there are tags for that 
very purpose, such as <object>.  For example, since 
<http://irrepressible.info/>'s javascript for your site uses 
document.write() and IIRC doesn't conform to Strict, I put it in another 
file that's HTML 4.01 Transitional and include it using
(I hope your e-mail client doesn't interpret this as HTML, because it's 
plain text in this email!!!:
<object data="irrepressible.html" type="text/html" width="180" 
height="150"><a href="http://irrepressible.info/">irrepressible</a></object>
)
Perhaps, ideally a web-server would say so if you were trying to serve 
invalid content, instead of serving that content (unless an explicit 
override perhaps).

P.S. wow, my pages under http://isaac.cedarswampstudios.org/muse/ are 
beautiful (to my eye) -- I had forgotten how much work I had done tuning 
the formatting and color!

-Isaac


More information about the xmonad mailing list