cburschka / cadence

A strophe.js-powered XMPP web client for chatrooms.
6 stars 2 forks source link

Put history in localstorage on close #436

Open cburschka opened 7 years ago

cburschka commented 7 years ago

Even with /save and (where applicable) server-side logging, losing the history is the most aggravating part about having to restart the computer/browser.

The messages could be JSON-encoded and put in localstorage on closing automatically.

We can even use some LZ implementation to compress it.

cburschka commented 7 years ago

As an interim measure, this patch will trigger a warning before closing the page even when disconnected, if there are messages that would be lost.