Password protect a static HTML page
If you have to run javascript it is not a static page anymore. I've seen a lot of this particularly weird overloading of "static HTML" lately. Static HTML, or static webpage, is meant to describe the experience from the person who is trying to look at the page. It does not describe the experience of the dev.Using a dynamic script or application to generate a static html page that requires no JS execution is a static page.Using a static HTML page and then hiding it behind javascript execution is explicitly not a static HTML page.Use .htaccess. And if you can't, reconsider the choices you made that restrict your abilities so significantly.