Microformats XFN
I’m getting into microformats in a big way. I guess you could say I drank the kool-aid. I’m going to start blogging a little bit about what I’ve learned. I will start with XFN. This idea was cooked up by Eric Meyer, Matt Mullenwegg and Tantek Celik. The premise was to describe the relationships that bloggers had in their blog rolls. To accomplish this they utilize the rel attribute. The rel attributes purpose is to describe the relationship the referenced document holds to the current document. Here is an example:
<link href="/css/bas.css" rel="stylesheet" type="text/css" />
Flickr badge vs XHTML 1.0
My website has been XHTML 1.0 Transitional for a while now. I decided to take the next step in XHTML and start serving the mime type application/xhtml+xml to user agents that accept it and serve text/html to those agents that are slipping behind the times (read IE-7). First thing I did was include this PHP code in my files.
<?php
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml");
}
else {
header("Content-type: text/html");
}
?>