How can I create a file on the client side?

By Saud Rana

It is not possible to create files on the client's computer using Javascript. This type of action is excluded from the Javascript language

It is not possible to create files on the client's computer using Javascript. This type of action is excluded from the Javascript language because it would be a serious security hazard. The only form of local file storage available through Javascript is cookies, whose behaviour and contents are strictly prescribed.

Of course it is possible to use Javascript to generate file content in a Web browser window and invite people to save the contents. Internet Explorer and Firefox users can use the File menu Save as... option directly, but Opera and other browser users may have to copy the text into another application to save it.

How can I create a file on the client side?  (944 Views)