views:

17

answers:

1

Hello,

normally browser stores and adds authentication header automaticly after successfull authentication.

I have a XMLHttpRequest and added the authentication header for basic auth. No problem at all.

Then I try to send a second request to the same url that is basic http protected without adding manually the http request header to this request. Poorly it seems that the browser is not storing the authentication provided in request 1. My goal is to add the authentication handler transparently to every request that follows the first one (like a native browser do).

Any idea? Thanks.

A: 

Browser only storing authetication requested from user. So, if you send 1st request w/o authentication fields, browser will prompt user for auth this time, remember credentials and use it for next requests transparently.

Andrey Cherezov

related questions