This is a rather unsecific question.
In the browser you can use what the browser offers (indexedDb, KeyValue store).
In Chrome packaged apps you can persist to a file on the client side too.
You can send data to a server and let persist in a file for the client.
On the server side you can persist to a file.
You can also use different kind of databases which store to a file as well.
Some information about a concrete use case would be helpful.