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?

65 of 81 people (80%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Can JavaScript send user:password to open an htaccess protected page?
Can JavaScript send user:password to access a htaccess protected page?
Does this work at all? (No success so far when accessing NS server using Communicator)

Apr 7th, 2008 23:13
ha mo, Martin Honnen, T. Postel, Knud van Eeden, Toralf Lund,


Browsers seem to support urls of the form
  http://username:password@www.yourdomain.tld
so JavaScript can set
  location.href = 'http://username:password@www.yourdomain.tld'
to open a htacess protected page. Note that the credentials will be 
visible in every url and in the location bar so though the approach is 
technically possible it is often not feasible for security 
considerations.
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