Saving files with JavaScript: CExplorer (demo)

JavaScript, Technical stuff
See comments
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).
Previous entry | Next blog entry

Responses to “Saving files with JavaScript: CExplorer (demo)”

  1. Montana Says:

    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.

  2. Laurent Says:

    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).

Comments for Saving files with JavaScript: CExplorer (demo)