[dokuwiki] Re: Patch attached: Optionally add a filetype to wikipage urls, e.g. .html to look like static html

  • From: Sander Tekelenburg <tekelenb@xxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 24 Feb 2009 02:39:02 +0100

At 23:27 +0100 UTC, on 2009-02-23, Helmut Tischer wrote:

[...]

> Andreas Gohr schrieb:
>> web tools do not care for extensions. It's the
>> content-type header that counts. ...

[...]

> For example if there is a search result or someone sends a "funny" link,
> my motivation to follow the link by sure depends on whether it pretends
> to be a .jpg, .doc, .ppt, .pdf or unpredictable filetype where I only
> know that it is a html if I know that the destination site is a
> DokuWiki, and in this case no ending means actually html.

Why? As Andreas said, file name extensions have no meaning on the Web. Just
because a link ends in ".jpg" doesn't mean it is a JPEG; just because it ends
in ".html" doesn't mean it's HTML. (Yes, I've seen actual ".jpg" links in the
wild that point to quite different things.) There's nothing in a link itself
that can tell you what file type it points to. This can only be conveyed
through meta information -- be it a Content-Type header, or the
trustworthyness of the sender of the funny link. (And in email, without good
use of encryption, you can't even be sure it came from who it says ;))

To be nice to wary users, HTML let's you provide a type attribute to <a>. But
that's just a service for the user, and most users won't ever know, because
most browsers do nothing useful with it.

> (Of course, if the pretended extension is maliciously wrong, I still get
> a surprising Browser "Safe as" dialog).

Which browser? I doubt a ".jpg" URL returning text/html with embedded
javascript will give a "save as" dialog in any browser.


-- 
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: