Why would you use redis over localStorage if you only needed less than 5MB of storage?

local-storage, redis

Solution

I would say one reason you did not find any answer to this question is probably because Redis is not supposed to be used from the browser ...

Considering localStorage is a browser facility, it cannot be compared with Redis. Redis provides remote storage for backends. It is not supposed to be exposed on the Internet, but rather deployed on a trusted network (like many other NoSQL stores).

IMO you are comparing apples and oranges here ...

Problem

I'm trying to figure out if using localStorage is better than redis for storing sets of data that won't go over the 5MB limit of localStorage. In the website I'm implementing, the plan is when an end user goes to any page then a check is made on whether the user has the most recent data stored in localStorage. If not, then refresh it. By doing it this way the user won't need to go to an outside datastore like redis which should make it faster. I couldn't find any resources online that could answer this question. I'm not sure if the reason why is because I'm going about it the wrong way or not. Thanks for your help!

Original source