JavaScript Unique Browser Id
You can use biri library. The ID is generated per computer, and doesn't change unless the MAC address of the computer changes.
Use cookies
and some unique hash into its. (Each browser has own cookie jar, even if on computer is many browsers)
What you are looking for is called Browser Fingerprinting.
You can google for some open source libraries. Ex: fingerprintjs2
Check out EFF's demo
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
if (Sys.ie) document.write('IE: ' + Sys.ie);
if (Sys.firefox) document.write('Firefox: ' + Sys.firefox);
if (Sys.chrome) document.write('Chrome: ' + Sys.chrome);
if (Sys.opera) document.write('Opera: ' + Sys.opera);
if (Sys.safari) document.write('Safari: ' + Sys.safari);
With these code you can get the type and the version of the browser, and the value should be unique according to different browser , if you want to generate other unique ID base on it , then use it