Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
326e78d Fixes #259.
Currently this leaves
none
as the default, same behaviour as now.Also includes c62fc42 as a proposed solution to https://github.com/ably/realtime/issues/540: turn off persisting the connection onConnect, so that it's only persisted on page refresh; and unpersist after a successful recovery. Former change minimises the time the cookie is persisted to the duration of the refresh/reconnect cycle, rather than the whole time. Latter change prevents a recovery key from being used twice (unless there's a race condition between tabs, which is much less likely). The downside is we lose the fallback recover-from-key-only (no serial) functionality - but afaict that's really only useful if onPageRefresh isn't supported, which at this point is very few browsers (safari < 3 and that's about it), so I don't think we're losing much.