Created an imitation for localStorage if is not supported in the browser