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

David Kendal 於 4/9/2017 4:51 AM 寫道:
> This is a shame because there are many possible uses for local static
> files accessing other local static files: the one I have in mind is
> shipping static files on CD-ROM or USB stick, but there is also the more
> obvious (and probably more common) use of local files by developers
> prototyping their apps before deploying them live to an HTTP server.

I can't see this being addressed. The only good reason to distribute an 
application this way is because you want it to be confidential and 
there's no incentive to accommodate what one might call "walled gardens" 
in HTML because they naturally have a limited audience. For example, if 
your application is being distributed via CD, that implies that that 
number of application instances will be limited to the number of 
physical media items, that the application will never be updated, and 
that the application therefore isn't particularly important.

If you really want a private HTML-based application, you might consider 
a password-protected webpage. If the application isn't a throwaway app, 
you'll want to do that anyway, so there isn't anything lost from the 
upkeep required of maintaining an online server.

As for development, it's trivial to install a local server using an 
offering like XAMPP and this gives you the power to test things like URL 
redirects that you can't test otherwise.

Received on Tuesday, 11 April 2017 11:56:03 UTC