{"record":{"id":"7b9d742719fd6cf3","repo":"Semantic-Org/Semantic-UI","slug":"saving-remote-data-requires-session-storage","errorCode":null,"errorMessage":"Saving remote data requires session storage","messagePattern":"Saving remote data requires session storage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/dropdown.js","lineNumber":3799,"sourceCode":"  name           : 'Dropdown',\n  namespace      : 'dropdown',\n\n  message: {\n    addResult     : 'Add <b>{term}</b>',\n    count         : '{count} selected',\n    maxSelections : 'Max {maxCount} selections',\n    noResults     : 'No results found.',\n    serverError   : 'There was an error contacting the server'\n  },\n\n  error : {\n    action          : 'You called a dropdown action that was not defined',\n    alreadySetup    : 'Once a select has been initialized behaviors must be called on the created ui dropdown',\n    labels          : 'Allowing user additions currently requires the use of labels.',\n    missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',\n    method          : 'The method you called is not defined.',\n    noAPI           : 'The API module is required to load resources remotely',\n    noStorage       : 'Saving remote data requires session storage',\n    noTransition    : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'\n  },\n\n  regExp : {\n    escape   : /[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\n    quote    : /\"/g\n  },\n\n  metadata : {\n    defaultText     : 'defaultText',\n    defaultValue    : 'defaultValue',\n    placeholderText : 'placeholder',\n    text            : 'text',\n    value           : 'value'\n  },\n\n  // property names for remote query\n  fields: {","sourceCodeStart":3781,"sourceCodeEnd":3817,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/dropdown.js#L3781-L3817","documentation":"read.remoteData()/save.remoteData() use sessionStorage to cache remote results across refreshes (enabled by the default saveRemoteData:true). If window.Storage is undefined, both log error.noStorage; save is skipped and read returns false, so remote data will not be restored on page refresh.","triggerScenarios":"saveRemoteData:true (the default) with remote apiSettings, running where sessionStorage is unavailable: some private-browsing modes, sandboxed iframes with storage disabled, SSR/non-window contexts, or storage blocked by browser settings.","commonSituations":"Older Safari private mode; cookies/storage blocked by the user; an embedded widget iframe without allow-same-origin storage.","solutions":["Set saveRemoteData:false to disable caching and avoid the error entirely","Ensure sessionStorage is available (not in a restricted iframe / storage not blocked)"],"exampleFix":"// before\n$('.ui.dropdown').dropdown({ apiSettings: { url: '/search?q={query}' } }); // saveRemoteData defaults to true\n// after\n$('.ui.dropdown').dropdown({ apiSettings: { url: '/search?q={query}' }, saveRemoteData: false });","handlingStrategy":"validation","validationCode":"function canUseSessionStorage() {\n  try {\n    return typeof window !== 'undefined' && window.Storage !== undefined\n        && window.sessionStorage !== null;\n  } catch (e) { return false; }\n}\nvar ddOpts = { apiSettings: { url: '/search?q={query}' } };\nddOpts.saveRemoteData = canUseSessionStorage(); // disable cache where unsupported\n$('.ui.dropdown').dropdown(ddOpts);","typeGuard":"function supportsSessionStorage() {\n  try { return !!window.sessionStorage; } catch (e) { return false; }\n}","tryCatchPattern":null,"preventionTips":["Default saveRemoteData:false when shipping to restricted/iframe environments","Feature-detect window.Storage before relying on remote-data caching","Do not treat missing sessionStorage as fatal — degrade to no-cache rather than erroring"],"tags":["dropdown","semantic-ui","session-storage","remote-data","environment"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}