Возможно, DOMStorage отключен? Протестируйте с помощью этого:
if (typeof window.Storage === 'undefined') { alert('Storage turned off...'); }