W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2017

Re: [whatwg] Accessing local files with JavaScript portably and securely

From: duanyao <duanyao@ustc.edu>
Date: Mon, 17 Apr 2017 23:53:32 +0800
To: Anne van Kesteren <annevk@annevk.nl>
Message-ID: <e45ecd21-d6fb-8a67-0597-2e39cfec8013@ustc.edu>
Cc: David Kendal <me@dpk.io>, "whatwg@whatwg.org" <whatwg@whatwg.org>, Domenic Denicola <d@domenic.me>
在 2017年04月17日 21:39, Anne van Kesteren 写道:
> On Mon, Apr 17, 2017 at 3:32 PM, duanyao <duanyao@ustc.edu> wrote:
>> So you mean file: protocol is not portable? For absolute file: url, true;
>> for relative url, almost not true.
>>
>> When writing web pages, no one use absolute file: urls in practice, so this
>> is a non-issue.
> Neither is portable or part of the web, since you don't allocate
> resources on someone else their machine that way. (And even in the
> sense that you mean it, they're not portable due to the different
> styles of matching, case-insensitive, Unicode normalization, custom
> variants of Unicode normalization, bytes vs code points, etc.)
>
>
When we want to write a web application portable across multiple server 
OSes, these issues could

happen too. The rules of thumb are (1) assume case-sensitive but don't 
create file names which differ

only in casing. (2) avoid characters subject to unicode normalization in 
file names.


I think "portable" is never absolute. There are always incompatibilities 
between browsers, and even

once standardized feature can be deprecated/removed in future, e.g. 
`window.showModalDialog()`,

`<applet>` and `<keygen>`.
Received on Monday, 17 April 2017 15:54:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 17 April 2017 15:54:39 UTC