A more lightweight solution would be to hash the password and have a copy of that file at this url. windows.location = hash(password);
Password protect a static HTML page
21–30 of 294 posts
Re: Password protect a static HTML page
#22Re: Password protect a static HTML page
#23Earlier quoted context omitted.
I think your definition of a static web page is different from the common one? In my head, a static page is something that's served verbatim, without some backend generating it or inserting things into a template. Wikipedia seems to agree with that view: https://en.wikipedia.org/wiki/Static_web_page
That's exactly what I said. It doesn't matter if I wrote the HTML by hand or I had a perl, or bash, or compiled c program make it. It's just an HTML file.
Re: Password protect a static HTML page
#24A more lightweight solution would be to hash the password and have a copy of that file at this url. windows.location = hash(password);
Re: Password protect a static HTML page
#25Should have used the WebCrypto API instead of the crypto-js npm package. https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_...
Re: Password protect a static HTML page
#26If 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 want to just have a free small private static page which is easily updated by public CI offerings this is a great solution, and the title transports this clearly.
Re: Password protect a static HTML page
#27A more lightweight solution would be to hash the password and have a copy of that file at this url. windows.location = hash(password);
Wow I like that. So simple and elegant. Could be combined with a username to produce unique urls per user.
Also now all intermediate things that have access to the hashed url would suddenly have access to a secure piece of information.
Don’t be clever with security
Re: Password protect a static HTML page
#28Anyone 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
#29Earlier quoted context omitted.
I think your definition of a static web page is different from the common one? In my head, a static page is something that's served verbatim, without some backend generating it or inserting things into a template. Wikipedia seems to agree with that view: https://en.wikipedia.org/wiki/Static_web_page
That's exactly what I said. It doesn't matter if I wrote the HTML by hand or I had a perl, or bash, or compiled c program make it. It's just an HTML file.
Otherwise, all of the React server side rendering is static HTML.
Re: Password protect a static HTML page
#30Earlier quoted context omitted.
I think your definition of a static web page is different from the common one? In my head, a static page is something that's served verbatim, without some backend generating it or inserting things into a template. Wikipedia seems to agree with that view: https://en.wikipedia.org/wiki/Static_web_page
That's exactly what I said. It doesn't matter if I wrote the HTML by hand or I had a perl, or bash, or compiled c program make it. It's just an HTML file.
CSS and JavaScript and images are also static, it doesn't have to be just HTML
If you have a perl or bash or c backend generating html in response to http requests it's not static