News for hackers. Stuff that matters.
Re:Show HN: Password-protect a static HTML page by examancer on Wednesday June 14, 2017 @02:40PM (#14554935)
Simple and useful. The perfect "Show HN".
Re:Show HN: Password-protect a static HTML page by nroets on Thursday June 15, 2017 @02:48AM (#14558404)
There are many caveats. For example, the server and the connection must be trusted. Otherwise, an attacker can the javascript to send himself a copy of your password.

And weak password are subject to bruteforcing.

If you trust the server, rather use htaccess. Or place the document at example.com/mySecretPassword/index.html Just be careful about outgoing links.