What limits a special MIME type to a given site?
First, choose one of:
Content-Type: text/plain; tabs-width=4
Content-Type: text/tabbed; tabs-width=4
as the way of indicating that a tab means 4 spaces.
If you're serving foo.c over HTTP, you just configure your server to
send that out (and get browsers fixed w.r.t. parsint MIME content
types with parameters!). In the interim, you can configure your browser
to launch an external viewer for text/tabbed, ala:
text/tabbed: less %s -x%{tab-width} %needsterminal
If you're _not_ serving foo.c over HTTP, you have to be able to put
this info in the link.
I have argued for a CONTENT-TYPE attribute on the <A> element for
over two years. There are cases where the author of the link knows
more than the receiving browser can infer about the content type.
For example, if there's a postscript file on an FTP server out there
called "report_127," you effectively can't link to it given today's
web. The browsers just look at the filename to determine the
type. (OK... they could look for %! like the unix file command, but
(1) they don't, and (2) for things like this tab witdth situation,
there's nothing in the file to tell you what its type is.)
So we should be able to write:
<a href="foo.c" content-type="text/tabbed; tab-width=4">foo.c</a>
I think this is a good idea, but I have never been able to convince
enough folks to get it deployed :-{
Dan