3 ms·
Serializing the user's session state to LocalStorage comes to mind as a reasonable solution. Comes with it's own caveats, of course (you now have a state versio
by debaserab2 5y ago
Serializing the user's session state to LocalStorage comes to mind as a reasonable solution. Comes with it's own caveats, of course (you now have a state versioning problem), but addresses all the points you bring up pretty adequately:
1. As long as their on the same device/browser, they lose zero data. This is a pretty reliable happy-path use case.
2. The only onslaught you'll deal with is simple pageviews since everything in the trial is stored client side, which also makes #3 no problem.
- PinkPigeon 5y agoVery good point about LocalStorage, I haven't explored that avenue yet. Re your second point, unfortunately with my product this works a bit differently. I'm generating static websites in the background, as part of a realtime-preview functionality. That, unfortunately leads to reasonably high server load. I'll have to have a think about how to approach that in the future :)