Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How far does the Offline-first feature of gunJS go ?

I would like to know how the data is persisted(saved) on the device, does it survive a reboot ? or a restart of the browser ?

like image 603
Xsmael Avatar asked Oct 21 '25 04:10

Xsmael


1 Answers

From the author of gun:

it depends on the device. In case of the browser, localStorage is used and can survive reboot, reload, etc.

If it is in NodeJS, most storage adapters (the current default file.js, the upcoming default RAD, and others) store to disk (and even some, to S3, IPFS, etc.) which survive reboot and can even migrate between machines (like with Heroku) for the latter adapters.

source: https://github.com/amark/gun/issues/529

like image 80
Xsmael Avatar answered Oct 22 '25 19:10

Xsmael



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!