f



Local filesystem.

I am writing a web application and I want to store some user data
on his local site, not on the server.
Is it possible ?
Is there a set of functions for manage the local filesystem ?
And if it is true, how can I do that ?
Thanks for any idea.
JPM
0
JPM
12/8/2016 8:22:43 AM
comp.lang.javascript 38370 articles. 0 followers. javascript4 (1315) is leader. Post Follow

6 Replies
111 Views

Similar Articles

[PageSpeed] 16

JPM <jpm@ailleurs> writes:
>I am writing a web application and I want to store some user data
>on his local site, not on the server.
>Is it possible ?

  Ever heard of "cookies"?

  There also is Web storage: local storage and session
  storage, behaving similarly to persistent cookies and
  session cookies, respectively.

  The user can save resources from the server to a file
  ("download") or upload files to the server with a form.

  A document (in a new window) that the user can then save as
  a file can be generated from a script on the fly.

  A text field can be used to exchange textual data
  between the script and a file, when the user uses
  the clipboard to exchange text between the text file
  that he views in his text editor and the text field. 

  A script has no direct access to the file system though.

0
ram
12/8/2016 9:51:44 AM
JPM <jpm@ailleurs> wrote:
^^^^^^^^^^^^^^^^^^
Non, monsieur.

> I am writing a web application and I want to store some user data
> on his local site, not on the server.
> Is it possible ?

Yes.

> Is there a set of functions for manage the local filesystem ?

Yes.

> And if it is true, how can I do that ?

Depends on the data.  How long have you searched (the Web) for a solution?

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
0
Thomas
12/8/2016 9:58:08 AM
Stefan Ram wrote:

>   A script has no direct access to the file system though.

Incorrect.  It depends where and how the script is running.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
0
Thomas
12/8/2016 10:00:30 AM
In comp.lang.javascript message <58491839$0$3329$426a74cc@news.free.fr>,
Thu, 8 Dec 2016 09:22:43, JPM <jpm@ailleurs.?.invalid> posted:

>I am writing a web application and I want to store some user data
>on his local site, not on the server.
>Is it possible ?
>Is there a set of functions for manage the local filesystem ?
>And if it is true, how can I do that ?
>Thanks for any idea.

Read <https://en.wikipedia.org/wiki/HTML_Application>.

A Web application should not be able to read/write the local filesystem
without explicit permission; but running an HTA in MSIE might be
considered as giving such permission.

See <https://en.wikipedia.org/wiki/Sandbox_(computer_security)> and
<https://en.wikipedia.org/wiki/Sandbox_(software_development)>.

Look at <http://wsh2.uw.hu/index.html> ff., as it might be useful to
you, some day.

-- 
 (c) John Stockton, Surrey, UK.  �@merlyn.demon.co.uk   Turnpike v6.05   MIME.
 Merlyn Web Site <                       > - FAQish topics, acronyms, & links.


0
Dr
12/9/2016 8:11:24 PM
A web application can do whatever it wants =E2=80=94if implimented improper=
ly=E2=80=94 however they will do what they are told to do perfectly most of=
 the time.
If the web app is being served on his local machine you can write Javascrip=
t intended to be used on a specific platform i.e. macOS/Unix or any other o=
perating system that exists and I don't care about. If it is being served v=
ia his server then it will more than likely have to be done with session/lo=
cal storage and configured with key/pair values, JSON.parse and a whole lot=
 of other stuff that could have been done using PHP and the FTP protocol.
0
rmmjr
12/11/2016 2:53:06 PM
On Thursday, December 8, 2016 at 2:22:22 AM UTC-6, JPM wrote:
> I am writing a web application and I want to store some user data
> on his local site, not on the server.
> Is it possible ?
> Is there a set of functions for manage the local filesystem ?
> And if it is true, how can I do that ?
> Thanks for any idea.

Perhaps Web Storage will cover your needs:

<https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API>
0
Michael
12/13/2016 6:11:43 PM
Reply: