faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 44 people (39%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

How can I determine what the current username is on the machine running the browser?

Apr 5th, 2008 19:18
ha mo, Colin Fraser, Tony Sorrentino,


The short answer is that you cannot, not without prompting the user for
their inputs. This is a security issue I suggest. But why would you want
to? Add to your own security? Doubtful. 
However, if you want to protect your site a bit then ask for the
information you want then set a cookie with that data. Everytime the
user enters your page look for the cookie, alowing entry if the cookie
is there or prompting for the required data if it is not. You can 
register the login time of the user and other things using this data.
There are a number of questions already asked and answered to
demonstrate how to do this, and I am not going to re-invent the wheel
here.       
Good luck.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com