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');            
}

3
1
Winnie 105 points

                                    about 5MB

3 (1 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
localstorage max space chrome local storage max size localstorage max limit chrome local storage size local storage max size chrome javascript localstorage max size how get the max size of local storage in js javascript max local storage size localstorage max capacity show local storage max size local storage max size by browser local storage max size value max size for localstorage js localstorage max size what is the maximum size of localstorage change max localstorage size browser local storage max size javascript localstorage maximum storage js local storage max size get local storage max size local storage check max size local storage maximum size maximum storage of localstorage local forage max storage size localstorage max data size maximum localstorage size maximum size of localstorage max localstorage size localstorage size max browsers localstorage max size per key local storage max capacity browser localStorage maximum size max local storage size localstorage maximum size what is the limit of local storage localstorage capacity to each url or max memory website local storage storage maximum size local storage javascript max chrome loclal storage size window localstorage max size max browser storage maximum local storage per website maximul local storage per website chrome local storage limit max size local storage localstorage max file size local storage capacity html5 local storage limit local storage max size local storage size limit for a website html5 localstorage size limit browser local storage how many entries i can store local storage limit in chrome chrome max local storage size chrome default local storage limit local storage limits by browser localstorage limit javascript storage limits limit of local storage local storage limit chrome localstorage item limit localstorage size limit chrome maximum size of local storage in js max size of localstorage js local storage limit item limits in localstorage localstorage max size limitation of local storage localstorage max local storage capacity chrome localstorage browser max storage localstorage max size exceeded localstorage storage limit how big is local storage local storage size limit localstorage data limit local storage in javascript data limit what is the maximum size of a local storage file local storage limit localStorage size limit javascript get local storage quota in mb javascript local storage limit what is max size for localstorage
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source