Store and load context from localStorage