Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

local storage check max size

//run this in dev console to test how much local storage you have
try {
	// Test up to 20 MB
	for (var i = 250; i <= 20000; i += 250) {
		localStorage.setItem('test', new Array((i * 1024) + 1).join('a'));
	}
} catch (e) {
	localStorage.removeItem('test');
	console.log('Local Storage Max Size is:', (i - 250)/1000, 'MB');            
}
Comment

what is max size for localstorage

about 5MB
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery change selected option to first 
Javascript :: find password input jquery 
Javascript :: javascript sleep 1 second 
Javascript :: modify root in javascript 
Javascript :: jquery select radio by name 
Javascript :: get actual url in variable 
Javascript :: NullInjectorError: No provider for HttpHandler! 
Javascript :: upgrade nodejs and npm ubuntu 
Javascript :: aos library animation angular 
Javascript :: javascript delete cookie 
Javascript :: localstorage read all key 
Javascript :: express body-parser deprecated 
Javascript :: random alphabet generator node js 
Javascript :: javascript foreach object key 
Javascript :: javascript read json file 
Javascript :: columndefs in datatable not working while setting width jquery 
Javascript :: BROWSER=none npm start exited with code 1 
Javascript :: bright green in javascript 
Javascript :: class MyComponent extends React.Component { } ... what is the ES5 equivalent of this * 
Javascript :: ajax request 
Javascript :: reversing an array in js 
Javascript :: get ckeditor textarea value in jquery 
Javascript :: how to insert image by javascript 
Javascript :: jquery find parent 
Javascript :: telegraf js sendmessage 
Javascript :: vetur Property has no initializer and is not definitely assigned in 
Javascript :: protractor get active element 
Javascript :: remove attribute disabled 
Javascript :: axios post formdata 
Javascript :: javascript set file input value to null 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =