Is there a way to check through AJAX if the website uses basic authorization without letting the browser display the login dialog?
My current call:
$.ajax
type: 'HEAD'
url: url
success: (data) ->
console.log 'jep'
error: (jqXHR, textStatus, errorThrown) ->
console.log 'nope'
This will always display a login dialog if the site uses authorization. However, I just want to know if the site is protected by basic authorization or not. I could not find a way to do this. I know this solution, but I can not edit the server response.
source
share