           localStorage.setItem(key, value);
                    } catch (e) {
                        this.data[key] = value;
                    }
                },
                removeItem: function (key) {
                    try {
                        localStorage.removeItem(key);
                    } catch (e) {
                        delete this.data[key];
                    }
                }
            };

            // Load search history from storage
            function loadSearchHis