function local_storage_space() {
		var data = "";
		for(var key in window.localStorage) {
			if(window.localStorage.hasOwnProperty(key)) {
				data += window.localStorage[key];
			}
		}
		var used = (Math.ceil((data.length * 16) / (8 * 1024))).toFixed(0);
		if(used < 2 && used > 0) {
			used = 2;
		}
		var free = 5120 - used;
		var space = { used:separate_thousands(used), free:separate_thousands(free) };
		return space;
	}
// Check how much free space local storage has.

Check how much free space local storage has.
Check how much free space local storage has .
function local_storage_space() {
		var data = "";
		for(var key in window.localStorage) {
			if(window.localStorage.hasOwnProperty(key)) {
				data += window.localStorage[key];
			}
		}
		var used = (Math.ceil((data.length * 16) / (8 * 1024))).toFixed(0);
		if(used < 2 && used > 0) {
			used = 2;
		}
		var free = 5120 - used;
		var space = { used:separate_thousands(used), free:separate_thousands(free) };
		return space;
	}
function local_storage_space ( ) { var data = "" ; for ( var key in window . localStorage ) { if ( window . localStorage . hasOwnProperty ( key ) ) { data += window . localStorage [ key ] ; } } var used = ( Math . ceil ( ( data . length * 16 ) / ( 8 * 1024 ) ) ) . toFixed ( 0 ) ; if ( used < 2 && used > 0 ) { used = 2 ; } var free = 5120 - used ; var space = { used : separate_thousands ( used ) , free : separate_thousands ( free ) } ; return space ; }
Check how much free space local storage has.
Check how much free space local storage has .