[Webkit-unassigned] [Bug 114798] New: Don't penalize synchronous XHR users for the 'file://' protocol

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 18 03:16:21 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=114798

           Summary: Don't penalize synchronous XHR users for the 'file://'
                    protocol
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: XML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andyearnshaw at gmail.com


I can understand the reasons for discouraging synchronous XHR over HTTP, but many rendering engines are now being used for client applications with file access privileges.  For instance, WebKit is a popular platform choice for Smart TV applications (used by at least Samsung and LG televisions from 2011 onwards).  Rather than implementing proprietary APIs for certain features, it's easier for these platforms to just reuse the web APIs to keep compatibility high.  So, rather than having a proprietary API for loading local files, XMLHttpRequest should be used with the 'file://' protocol.

With local file access, there's no real advantage of using an asynchronous request over a synchronous one.  Using a synchronous request keeps the code procedural, as well as shorter and easier to read.

https://bugs.webkit.org/show_bug.cgi?id=72154, for example, recommended disabling `responseType` for all synchronous requests which, in my opinion, is rather short-sighted.  I'm all for discouraging bad practices in use by web developers, but I'm surprised nobody had the foresight to see that XMLHttpRequest isn't just used for HTTP and WebKit isn't just used in web browsers.

I realise this is only a minor inconvenience (I'm sure I can cope with the extra 4 lines of code I have to write), but a simple check to see if the request is being made on the local file system doesn't seem like something that would be difficult to implement.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list