Hi risto,
you possibly could mix NWjs in ( https://www.scirra.com/manual/162/nwjs ) which is capable of writing data to a local (or remote-connected) storage medium. Using NWjs would force you to get away from AJAX write operations since it only reads data in this constellation.
Otherwise you could setup a local dev-environment, using your local Node/PHP/whatever back-end for debugging purposes (depending on "what" you want to achieve in your prod-environment). There are some toolkits which feature out-of-the-box configurations (depending on your OS).
Haven't worked for quite some time with C2, but I think just throwing out a *.JSON (or of course *.CSV or *.TXT or [...]) would be the easiest option since vanilla HTML is capable of saving files (in other words: ready up the content to be saved and trigger a file-download).
Have a great day,
Proxy