Live data from Hacker News

Password protect a static HTML page

github.com

1–10 of 294 posts

Re: Password protect a static HTML page

#3
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.

Re: Password protect a static HTML page

#7
post #5

Anyone remembers .htaccess files from Apache? Good times.

Those would be quite nice, if web browsers were good HTTP clients.

The user experience with basic auth is not so good. The dialogs give little way to customize and providing information for user. No support for logout or any form of password changes.

Re: Password protect a static HTML page

#10
post #3

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…

I would call any server side or client side code which alters the HTML non-static. A static HTML page is just an HTML file which is stored on the server and displayed as-is in the browser.
Post reply on HN