Is there a way to create a text file on the client side and prompt the user to download it without any interaction with the server?
I know I can’t write directly to their machine (security and all), but can I create the file and prompt them to save it?
You can use data URIs. Browser support varies; see Wikipedia. Example:
The octet-stream is to force a download prompt. Otherwise, it will probably open in the browser.
For CSV, you can use:
Try the jsFiddle demo.