Semantic-Org/Semantic-UI · error
Saving remote data requires session storage
Error message
Saving remote data requires session storage
What it means
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.
Source
Thrown at src/definitions/modules/dropdown.js:3799
name : 'Dropdown',
namespace : 'dropdown',
message: {
addResult : 'Add <b>{term}</b>',
count : '{count} selected',
maxSelections : 'Max {maxCount} selections',
noResults : 'No results found.',
serverError : 'There was an error contacting the server'
},
error : {
action : 'You called a dropdown action that was not defined',
alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown',
labels : 'Allowing user additions currently requires the use of labels.',
missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',
method : 'The method you called is not defined.',
noAPI : 'The API module is required to load resources remotely',
noStorage : 'Saving remote data requires session storage',
noTransition : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'
},
regExp : {
escape : /[-[\]{}()*+?.,\\^$|#\s]/g,
quote : /"/g
},
metadata : {
defaultText : 'defaultText',
defaultValue : 'defaultValue',
placeholderText : 'placeholder',
text : 'text',
value : 'value'
},
// property names for remote query
fields: {View on GitHub (pinned to 597843ab84)
Solutions
- Set saveRemoteData:false to disable caching and avoid the error entirely
- Ensure sessionStorage is available (not in a restricted iframe / storage not blocked)
Example fix
// before
$('.ui.dropdown').dropdown({ apiSettings: { url: '/search?q={query}' } }); // saveRemoteData defaults to true
// after
$('.ui.dropdown').dropdown({ apiSettings: { url: '/search?q={query}' }, saveRemoteData: false }); Defensive patterns
Strategy: validation
Validate before calling
function canUseSessionStorage() {
try {
return typeof window !== 'undefined' && window.Storage !== undefined
&& window.sessionStorage !== null;
} catch (e) { return false; }
}
var ddOpts = { apiSettings: { url: '/search?q={query}' } };
ddOpts.saveRemoteData = canUseSessionStorage(); // disable cache where unsupported
$('.ui.dropdown').dropdown(ddOpts); Type guard
function supportsSessionStorage() {
try { return !!window.sessionStorage; } catch (e) { return false; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Older Safari private mode; cookies/storage blocked by the user; an embedded widget iframe without allow-same-origin storage.
Related errors
- There was an error contacting the server
- The API module is required to load resources remotely
- Caching responses locally requires session storage
- You called a dropdown action that was not defined
- Once a select has been initialized behaviors must be called
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/7b9d742719fd6cf3.
Report an issue: GitHub.