react-ab-test icon indicating copy to clipboard operation
react-ab-test copied to clipboard

Option to use cookies instead of localstorage

Open osdiab opened this issue 3 years ago • 2 comments

Table of Contents

  • Expected Behavior
  • Current Behavior
  • Possible Solution
  • Steps to Reproduce (for bugs)
  • Context
  • Your Environment

Expected Behavior

if local storage is a no-op for the given browser or is not present, try using a cookie or some other storage mechanism instead; can be placed behind a flag if that's not desirable.

Current Behavior

Current behavior forces local storage as the storage medium

Possible Solution

Would be great if we can use a cookie as a backup if localstorage doesn't work

Steps to Reproduce (for bugs)

not relevant

Context

Localstorage is a no-op in iOS private browsing, which we've found to be unfortunately common on our service; but cookies definitely work in that scenario.

Your Environment

  • Version used: 2.3.0
  • Browser Name and version: Mobile Safari
  • Operating System and version (desktop or mobile): iOS 13.7
  • Link to your project: private repo

osdiab avatar Sep 22 '20 10:09 osdiab