Live data from Hacker News

Password protect a static HTML page

github.com

61–70 of 294 posts

Re: Password protect a static HTML page

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

Logout is possible: The server has to send http status 401 if I recall correctly. The browser treats this as logout.

Re: Password protect a static HTML page

#62
post #11

Earlier quoted context omitted.

> 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. I don't think this has been the common meaning of "static page" for at least 10 years. From Wikipedia [0]: >…

The title says “static HTML page” not “static web page”. JavaScript is not HTML.

Neither is CSS, if you want to be pedantic.

Re: Password protect a static HTML page

#64

Earlier quoted context omitted.

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.

Isn't that sort of a feature? Customizable HTTP auth dialogs are a security liability, as they blur the line between content and browser.

Yes and no. There is some part of it which helps to identify where you are connecting to. Meanwhile those dialogs aren't modal anymore, which allows access to https certificate info, but it is still complicated to provide trust for average users.

Re: Password protect a static HTML page

#65
post #44
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…

> If you have to run javascript it is not a static page anymore I understand static pages as files sent to a browser without having to be generated server-side.

Right. This concept has existed for decades, and people should figure out what it actually means before complaining.

Re: Password protect a static HTML page

#66
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…

This is nonsense semantics. Words and phrases change meaning over time.

It didn’t even “change meaning”

As far back as I remember (and I played with JavaScript when it was first introduced in beta for Netscape), a “static web page server” always meant that there was no backend server generating pages on the fly.

Re: Password protect a static HTML page

#67
post #8

Or... http authentication.

You can email or hand out physical copies on usb would be one use case where server auth can't compete.

Aren't existing encryption tools more flexible for sending out copies via those methods? e.g. by making more cipher suites available? Or by allowing you to encrypt with the intended recipients' public keys, so you don't need to worry about distributing the passphrase securely? And might allow better integration with password managers, as the OS would recognise the files as being encrypted?

Re: Password protect a static HTML page

#68

Earlier quoted context omitted.

Lol no. If you HTML is generated, it's by definition not static anymore. Otherwise, all of the React server side rendering is static HTML.

No, because React is dynamically generating the HTML on the fly. If you pre-compile the HTML using something like Jekyll, so that the webserver is just serving HTML files without any dynamic/on-the-fly processing at request time, then it's considered static.

React server side rendering: most likely dynamic

React on the client side: static, as you still got the same files served, how they dynamically alter the page runtime doesn't count.

Re: Password protect a static HTML page

#69

Earlier quoted context omitted.

Turns out when you give up the work of hosting your up stuff, you also give up some of the benefits from doing so.

Which is why a project that returns some of those benefits is genuinely cool and useful.

And even can give benefits by storing it encrypted at rest.

Re: Password protect a static HTML page

#70
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…

[deleted]
Post reply on HN