Saving files with JavaScript: CExplorer (demo)

Many people assume that client-side JavaScript cannot perform file-system operations on the client computer. Actually, the objects needed are often found in the browsers, and the rest is only a matter of compatibility (the way IE saves files is very different from the way Firefox saves files...) and of permissions.
In order to perform critical file-system operations, the script must be granted privileges. There are different ways to get these privileges, and unfortunately, these are very different depending on the browser your application run on.
I won't debate long on the subject of security and permissions in the browser, others did that much better than me (check Google for more information). The demo here demonstrates as a proof of concept that saving a file locally is possible in both major web clients available today (IE and Firefox, tested only on Windows platform).
Print | posted on Monday, June 19, 2006 1:54 PM

Feedback

# re: Saving files with JavaScript: CExplorer (demo)

left by Montana at 2/16/2007 10:51 PM Gravatar
I am actually just looking for a Java script that saves a file on the client's computer -- you see, I am trying to create an online word processor.

# re: Saving files with JavaScript: CExplorer (demo)

left by Laurent at 2/17/2007 3:04 PM Gravatar
That's nice. The article I link to mentions the problems encountered, especially the permissions needed. I suggest you read it, download the file, test on your own computer, then test online (because the permissions are different).
Greetings
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: