html - Authentication required? javascript -


i wondering how can require authentication website. such in picture: https://kb.tanium.com/images/thumb/5/58/authenticationrequired.png/700px-authenticationrequired.png

can javascipt? help

that's basic http response code 401 sent browser upon request. can on webserver securing folder/page .htaccess file or directive, or can return 401 http response in code (java, php or whatever use) example in java:

response.setstatus(httpservletresponse.sc_unauthorized); 

normally handle of 401 responses job of browser, has nothing javascript. can try change defaut behavior of browser using javascript, try take @ page. i'd recommend not doing instead html form can freely customize , let return form identifiers.


Comments

Popular posts from this blog

javascript - Can Piwik report referrer in real time? -

asp.net - Google Drive Access: At least one client secrets (Installed or Web) should be set -

excel vba add hyperlink to shape in group -