1

I work with the API, located in my same site. Backend requires each request header encrypted login / password system Basic HTTP Authentication - Basic access authentication

If the data entry entered incorrectly - takes off here is a warning: Authentication required, to access the server http://gkeep.ua:80 you've to provide your credentials. Server message: Secured Area

Rough translation

Authentication required, to access the server http://gkeep.ua:80 you've to provide your credentials. Server message: Secured Area

it is the same type as a normal alert (), prompt () and confirm () I would like to disable this window by overriding function

window.alert = function () {}; alert (12345); // does not work

but it appeared that it is not alert (), audio prompt () or confirm () it is generally different, and how to turn it off, I do not understand

can someone faced with such a task, I will be grateful if you tell me how to solve it

Ramiz Wachtler
  • 5,623
  • 2
  • 28
  • 33
user3902759
  • 19
  • 1
  • 2

2 Answers2

4

it is the same type as a normal alert (), prompt () and confirm ()

No, it is not. It’s the authentication dialog brought up by the browser when it receives an HTTP status code 401 Unauthorized, JavaScript has nothing to do with – and that’s why you can not “disable” it via JavaScript either.

CBroe
  • 91,630
  • 14
  • 92
  • 150
1

Sorry cant comment because of reputation

Look this question How to prevent browser to invoke basic auth popup and handle 401 error using Jquery?

and this JavaScript: Overriding alert()

Community
  • 1
  • 1
SpiRT
  • 632
  • 7
  • 14