Live data from Hacker News

Ask HN: What are the *dynamic* needs for a static site these days?

news.ycombinator.com

11–20 of 22 posts

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#12

I built a service last year that provided a SQL database over CORS, access control (user login, registration with email confirmation, and password reset via email). Security was over https and user controlled authentication tokens. The idea was to provide toolkit for building dynamic services for static sites. The archetypical use case was comments for static blogs. I built a simple forum that supported user signup,…

I saw the link to it from your profile. Interesting concept. There are variations of this available: https://fieldbook.com/, Airtable, etc. I'll send you an email :)

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#13
post #5

Depends on the usecase. Sites for local stores need opening hours. Having those information as plain html is enough but that can be extended via ajax to show if store is currently open... So no need for dynamically rendered pages serverside.

No need for ajax/fetch. You can calculate that in the browser with the data in your plain, static HTML.

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#14
post #5

Depends on the usecase. Sites for local stores need opening hours. Having those information as plain html is enough but that can be extended via ajax to show if store is currently open... So no need for dynamically rendered pages serverside.

No need for ajax/fetch. You can calculate that in the browser with the data in your plain, static HTML.

Sure, but can we trust the date and time of the client?

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#15
post #14

Earlier quoted context omitted.

No need for ajax/fetch. You can calculate that in the browser with the data in your plain, static HTML.

Sure, but can we trust the date and time of the client?

99% of the time, yes, I'd say.

Having time/date wrong on your device - particularly a phone, which a lot of people use instead of a watch - is sufficiently annoying that it usually gets fixed.

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#16
post #14

Earlier quoted context omitted.

Sure, but can we trust the date and time of the client?

99% of the time, yes, I'd say. Having time/date wrong on your device - particularly a phone, which a lot of people use instead of a watch - is sufficiently annoying that it usually gets fixed.

Good point! I'll have a look into this, thanks!

Edit: Great advice! Works like a charm! I've never really worked with dates in JS. Should have read the docs earlier ;-)

Re: Ask HN: What are the *dynamic* needs for a static site these days?

#19
post #11

Access control (login).

There is auth0 ( https://auth0.com/ ) for authentication, and many hosts which support basic auth. What kind of use cases are you thinking when you say access control?

Static site hosted on GitHub Pages, or S3. I can't figure out whether auth0 supports that.
Post reply on HN