smart-create,
с вариантом str_rand от
Aetae,
function str_rand() {
var result = '', words = '1234567890qwertyuioplkjhgfdsazxcvbnm';
for( var i = 0; i < 6; ++i ) {
result += words.substr( Math.floor( Math.random() * words.length ), 1);
}
return result;
}
var result = localStorage.getItem('result') || str_rand();
localStorage.setItem('result', result );
alert(result);