Geeks With Blogs


What I do:

Identity Mine

MVVM Light


What I am:

Microsoft Most Valuable Professional, Client Application Development

Microsoft Certified Technology Specialist, Windows Presentation Foundation

WPF disciples


View my profile on LinkedIn

Creative Commons License
Diary of a Code Trotter by Laurent Bugnion is licensed under a Creative Commons Attribution 3.0 Unported License

All source code on this blog is licensed under the MIT license.

Copyright (c) 2006 - 2011 GalaSoft Laurent Bugnion

Laurent Bugnion (GalaSoft) Diary of a Code Trotter
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).
Posted on Monday, June 19, 2006 1:54 PM Technical stuff , JavaScript | Back to top

Comments on this post: Saving files with JavaScript: CExplorer (demo)

# re: Saving files with JavaScript: CExplorer (demo)
Requesting 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.
Left by Montana on Feb 16, 2007 10:51 PM

# re: Saving files with JavaScript: CExplorer (demo)
Requesting 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).
Left by Laurent on Feb 17, 2007 3:04 PM

Comments have been closed on this topic.
Copyright © Laurent Bugnion | Powered by: