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

在 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