[whatwg] How to determine content-type of file: protocol

2014-07-17 Thread duanyao
Hi, My first question is about a rule in MIME Sniffing specification (http://mimesniff.spec.whatwg.org): 5.1 Interpreting the resource metadata ... If the resource is retrieved directly from the file system, set supplied-type to the MIME type provided by the file system. As far

Re: [whatwg] How to determine content-type of file: protocol

2014-07-28 Thread duanyao
On 07/28/2014 06:34, Gordon P. Hemsley wrote: Sorry for the delay in responding. Your message fell through the cracks in my e-mail filters. On 07/17/2014 08:26 AM, duanyao wrote: Hi, My first question is about a rule in MIME Sniffing specification (http://mimesniff.spec.whatwg.org

Re: [whatwg] How to determine content-type of file: protocol

2014-07-28 Thread duanyao
On 07/28/2014 22:08, Gordon P. Hemsley wrote: On 07/28/2014 08:01 AM, duanyao wrote: On 07/28/2014 06:34, Gordon P. Hemsley wrote: Sorry for the delay in responding. Your message fell through the cracks in my e-mail filters. On 07/17/2014 08:26 AM, duanyao wrote: Hi, My first question

Re: [whatwg] How to determine content-type of file: protocol

2014-07-31 Thread duanyao
于 2014年07月31日 02:02, Anne van Kesteren 写道: On Tue, Jul 29, 2014 at 4:26 PM, 段垚 duan...@ustc.edu wrote: 于 2014/7/29 18:48, Anne van Kesteren 写道: There's an enormous amount of tricky things to define around file URLs, this being one of them. Are there some resources on those tricky things? No,

[whatwg] Memory management problem of video elements

2014-08-19 Thread duanyao
Hi, Recently I have investigated memory usage of HTML video element in several desktop browsers (firefox and chrome on windows and linux, and IE 11), and have found some disappointing results: 1. A video element in a playable state consumes significant amount of memory. For each playing or

Re: [whatwg] Memory management problem of video elements

2014-08-19 Thread duanyao
于 2014年08月19日 16:00, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 9:12 AM, duanyao duan...@ustc.edu wrote: Hi, Recently I have investigated memory usage of HTML video element in several desktop browsers (firefox and chrome on windows and linux, and IE 11), and have found some disappointing

Re: [whatwg] Memory management problem of video elements

2014-08-19 Thread duanyao
于 2014年08月19日 20:23, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 11:56 AM, duanyao duan...@ustc.edu wrote: 于 2014年08月19日 16:00, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 9:12 AM, duanyao duan...@ustc.edu wrote: Hi, Recently I have investigated memory usage of HTML video element

Re: [whatwg] Memory management problem of video elements

2014-08-20 Thread duanyao
于 2014年08月20日 15:52, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 3:54 PM, duanyao duan...@ustc.edu wrote: 于 2014年08月19日 20:23, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 11:56 AM, duanyao duan...@ustc.edu wrote: If the media element object keeps track of its current playing url

Re: [whatwg] Memory management problem of video elements

2014-08-20 Thread duanyao
于 2014年08月20日 19:26, Philip Jägenstedt 写道: On Wed, Aug 20, 2014 at 12:04 PM, duanyao duan...@ustc.edu wrote: 于 2014年08月20日 15:52, Philip Jägenstedt 写道: On Tue, Aug 19, 2014 at 3:54 PM, duanyao duan...@ustc.edu wrote: I'm not familiar with game programing. Are sound effects small audio files

Re: [whatwg] Modify the Page Visibility spec to let UA's take into account whether iframes are visible on the screen

2015-03-31 Thread duanyao
autopause looks promising, but I want to ask for more: also add an autounload attribute to allow UAs to unload specific iframes when they are invisible. I ask for this because I'm a contributor of pdf2htmlEX ( https://github.com/coolwanglu/pdf2htmlEX ). Currently pdf2htmlEX can convert each

Re: [whatwg] EventSource and data URLs

2015-04-27 Thread duanyao
在 2015年04月27日 22:58, Jonas Sicking 写道: On Mon, Apr 27, 2015 at 2:20 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Apr 27, 2015 at 7:00 AM, Anne van Kesteren ann...@annevk.nl wrote: Currently Chrome supports data URLs inside EventSource whereas in Firefox EventSource is restricted to

Re: [whatwg] EventSource and data URLs

2015-04-27 Thread duanyao
在 2015年04月28日 02:42, Jonas Sicking 写道: On Mon, Apr 27, 2015 at 7:37 PM, duanyao duan...@ustc.edu wrote: In iframe, srcdoc attribute seems as secure (insecure) as data: URL in src, so should it be removed from the spec? The difference there, and in the other examples that you mention

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

2017-04-11 Thread duanyao
We should be aware of the security risks when recommand a "simple web server". * Most (if not all) simple web servers don't block access from non-local hosts by default, which can leak users' files. Although your firewall can block them for you, users do need unblock non-local hosts

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

2017-04-12 Thread duanyao
在 2017年04月11日 20:04, Patrick Dark 写道: Jan Tosovsky 於 4/10/2017 5:38 PM 寫道: On 2017-04-10 David Kendal wrote: On 2017-04-09 Jan Tosovsky wrote: On 2017-04-09 David Kendal wrote: ... there are many possible uses for local static files accessing other local static files: the one I have in mind

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

2017-04-17 Thread duanyao
在 2017年04月17日 21:04, Anne van Kesteren 写道: On Mon, Apr 17, 2017 at 2:54 PM, duanyao <duan...@ustc.edu> wrote: 在 2017年04月15日 02:09, Domenic Denicola 写道: file: URLs are part of the web, e.g. parsing such URLs when used in tags, just like gopher: URLs or mailto: URLs. The behavio

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

2017-04-17 Thread duanyao
在 2017年04月17日 20:43, Roger Hågensen 写道: On 2017-04-17 13:53, duanyao wrote: For single page application, browsers restrict `foo.html`'s permission to `foo_files/` in the same parent directory. Note that it is already a common practice for browsers to save a page's resource to a `xxx_files

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

2017-04-17 Thread duanyao
在 2017年04月16日 01:54, David Kendal 写道: On 15 Apr 2017, at 14:07, Roger Hågensen wrote: Patrick makes a good point. For example asking a user if it' sok for the HTML document to access stuff in "C:\Users\Username\AppData\Local\Temp\" what do you think most uses will do?

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

2017-04-17 Thread duanyao
在 2017年04月15日 02:09, Domenic Denicola 写道: From: David Kendal [mailto:m...@dpk.io] This is getting silly. says the WHAT WG's purpose is to 'evolve the Web'; since file: URIs are part of the web, this problem falls within the WHAT WG's remit. file:

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

2017-04-17 Thread duanyao
在 2017年04月17日 21:39, Anne van Kesteren 写道: On Mon, Apr 17, 2017 at 3:32 PM, duanyao <duan...@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 practi

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

2017-04-18 Thread duanyao
在 2017年04月18日 19:27, Ashley Sheridan 写道: On 18 April 2017 12:18:57 BST, duanyao <duan...@ustc.edu> wrote: 在 2017年04月18日 18:52, Ashley Sheridan 写道: Maybe no. "files" is a generic word, so if you make every "xxx_files/" folders magical, it's quite possible tha

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

2017-04-17 Thread duanyao
在 2017年04月18日 00:03, Anne van Kesteren 写道: On Mon, Apr 17, 2017 at 5:53 PM, duanyao <duan...@ustc.edu> wrote: When we want to write a web application portable across multiple server OSes, these issues could happen too. Yes, but then you run into implementation bugs. Which are a very dif

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

2017-04-18 Thread duanyao
在 2017年04月18日 19:27, Ashley Sheridan 写道: On 18 April 2017 12:18:57 BST, duanyao <duan...@ustc.edu> wrote: 在 2017年04月18日 18:52, Ashley Sheridan 写道: Maybe no. "files" is a generic word, so if you make every "xxx_files/" folders magical, it's quite possible tha

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

2017-04-19 Thread duanyao
在 2017年04月19日 17:28, Anne van Kesteren 写道: On Wed, Apr 19, 2017 at 11:08 AM, duanyao <duan...@ustc.edu> wrote: This is really not intended. I just don't quite understand some of those points. For example, Is "the web being fundamentally linked to HTTP" just the current status

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

2017-04-18 Thread duanyao
在 2017年04月18日 16:08, Anne van Kesteren 写道: On Tue, Apr 18, 2017 at 9:57 AM, Roger Hågensen wrote: Searching Google for "offline webapp discussion group" turns up https://www.w3.org/wiki/Offline_web_applications_workshop and that's sadly from 2011. There is

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

2017-04-18 Thread duanyao
在 2017年04月18日 18:52, Ashley Sheridan 写道: Maybe no. "files" is a generic word, so if you make every "xxx_files/" folders magical, it's quite possible that there are folders happen to ends with "_files" but are not intented to be local web apps. If you require a `xxx.html` to make "xxx_files/"

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

2017-04-18 Thread duanyao
在 2017年04月18日 16:09, Roger Hågensen 写道: On 2017-04-17 15:22, duanyao wrote: This can handle multipage fine as well. Anything in the folder test.html_files is considered sandboxed under test.html The problem is, what if users open `test_files\page2.html`or `test_files\page3.html`directly? Can

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

2017-04-18 Thread duanyao
在 2017年04月19日 02:23, Ian Hickson 写道: The main thing that seems to be missing from this thread is any commitment from any browser vendors to actually support any changes in this space. Yes, and I had been pessimistic about that even before I join this thread. Actually I join the discussion

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

2017-04-19 Thread duanyao
在 2017年04月19日 16:09, Anne van Kesteren 写道: On Wed, Apr 19, 2017 at 5:45 AM, duanyao <duan...@ustc.edu> wrote: These have been a lot of discussion on that in this thread. Do you think writing a more formal document would be helpful? Perhaps. Fundamentally, I don't think you'v