MIME-type "validation"
Subject level: Advanced
There has been some commotion between XHTML-advocates and XHTML-purists about MIME-types for a while, now. I've added my share to all of that, but today I wrote a little tool related to MIME-types. Originally for myself, but perhaps some other people find it useful, too.
During all the recent discussions about %XHTML% and MIME-types, several people have made the claim that most of the current XHTML sites will not work when sent with an application/xhtml+xml MIME-type. Being curious about such things, I often test out sites to see what kind of header they send. Until today, I was forced to do this by hitting Ctrl-i and checking the Content-type in the Page Info pop-up. Not particularly enjoyable for me.
So, I asked around to see if anyone knew of an existing tool that would let you check a page with an application/xhtml+xml MIME-type: nobody knew of one, so I made one myself. Being the generous, sharing person that I am ;), I present to you, my MIME-type Tool.
Of course, having that tool there wasn't particularly faster than hitting Ctrl-i, so I made <a href="javascript:void(document.location='http://mime.kurafire.net/?uri=' document.location)">a little MIME-type Tool favelet</a>. Just drag that baby to your Personal Toolbar and hit it on any site you're at to check that page with an XHTML MIME-type.
Notes:
- You will have to use a Standards-conforming browser for this. Internet Explorer is useless!
- This tool will remain there as long as bandwidth usage does not suddenly skyrocket.
- Keep in mind that well-formed (XHTML) documents without an XHTML-namespace attribute on the
htmltag will be treated as XML documents.
For those who think this may be useful (from time to time): enjoy!
Bookmark:
Newsvine
del.icio.us
Digg
Comments
Subscribe: atom, rss, ..what are feeds?
Archives
- Popular Posts
- Starting with CSS: revisited
- IE7 beta 1 release
- Starting with CSS-based design
- Debunking the price myth: Apple vs. Dell
- Typography: serif vs. sans-serif
- Accessibility Rules & Tips #1: simple steps to make your website more accessible
- Review: System of a Down - Hypnotize
- Announcing: Happy Clog!
- AJAX and Accessibility
- Introducing V8
- Recent Posts
- Times are changing
- A change in direction
- CSS hacks: useful, evil or …laziness?
- Updates on the web
- Pink for October
- Flickrlicious Screensavers with iPhoto 6
- On FACE updates and getting published
- Great speakers I admire
- A new passion
- Standards-senses tingling?
FlickrFire
All times are in CET. It is now 19:46.

If you just want to check if it's an XML document or not, you could use
javascript:alert(document.xmlVersion ? "XML" : "Not XML"):)Wonderful :) I was thinking about when this would come. Only lil' problem is that I don't understand what your tool does? I have a page compliant to xhtml 1.0 transitional which has the mime type application/xhtml+xml (which btw is optional according to some sources for that doctype) - and this encoding is sent to all clients that can handle it. (checking http.accept)
Trying your tool on my page (http://194.236.30.84/swedendesign2/) simply returns the stripped non-css variant of it without images/flash. How do I know the result of the validation??
Henrik,
The tool simply checks for XML well-formedness. If you're using an XHTML-capable browser and check a site with the tool, you'll get a yellow screen of death if it's not well-formed, or just your site without relatively embedded content (css files, flash, etc.) if it is well-formed. :-)
Oh :) I see...
Hmm...