Live data from Hacker News

Building an HTML-first site doubled our users overnight

mohkohn.co.uk

81–90 of 605 posts

Re: Building an HTML-first site doubled our users overnight

#81
I haven't heard much about in a while, but the HTML Triptych proposal [0] is still something I hope to eventually land in browsers. HTML forms speaking to REST endpoints are a good pattern. (meaning user-aiding validation is handled via the input attributes, real validation is handled on the far side of the request, and the flow is GET /form => POST /thing => GET /thing/1) It would be a great pattern with the triptych features implemented!

[0] https://triptychproject.org/

Re: Building an HTML-first site doubled our users overnight

#82

Most of my apps are now simply HTMX + Go + SQLite. I've found it's enough for most projects. One of my sites is image heavy and serves 10 TB of traffic per month. For this, I use the following setup: 1. S3 (I wanted reliable data storage) 2. In front of it, I have Cloudflare (with Tiered Cache enabled, which makes POPs prefer pulling from Cloudflare rather than the origin). I've set rules to cache everything on both…

>One of my sites is image heavy and serves 10 TB of traffic per month

I can't imagine this kind of traffic without acting as a CDN, advertising broker, pornographer, or part of a massive ecommerce site. I have to wonder, what are you doing that generates 10TB of traffic per month?

Re: Building an HTML-first site doubled our users overnight

#83

People who built a crappy website using React are just as likely to build a crappy website using Astro, HTML-first approach or any other technology

I disagree. An HTML website which uses links, forms, buttons and inputs will by default:

* Have working back/forward buttons * Have working progress indicator as provided by the browser * Show errors to the user - even if they are ugly * Be accessible to keyboard navigation

With SPAs these are all things the developer has to get right.

So often when using a SPA I'll click a button, you get a spinner and then nothing will happen. Is it still in progress? Don't know. Eventually I'll open developer console and trace the network requests to find the JSON HTTP request that returned "ERR_BAD_EMAIL" and fix what I've entered. With a normal form submission at least the user will see the error message and can press back and then fix it.

Re: Building an HTML-first site doubled our users overnight

#85
I've started getting traffic on my website only after I re-build it with a locally-brewed MD parsing engine that uses Astro to spit out the final version of the site.

I guess the main argument is how easy it is for an LLM to ingest the content, since I can bet all of the crawlers are llm-enabled one way or another.

Re: Building an HTML-first site doubled our users overnight

#86

Recently I had to migrate an old SpringBoot app that had a React front-end to a new cluster. Not wanting to mess with super-old dependencies, I opted to rewrite it on a new version of Java/SpringBoot. When it came to the frontend, I paused. I couldn't come up with a single good reason why this app needed React. I rewrote the frontend in straight HTML with a little bit of JavaScript for DOM manipulation. I literally u…

esm.ah let's you include "complicated" JS that isn't usually found in CDNs.

it doesn't work for everything and imo is worse for (p)react due to the lack of native JSX, but it does allow for bringing in stuff that usually takes an `npm install && npm build`

Re: Building an HTML-first site doubled our users overnight

#87
post #40

Having been building websites since the mid 90's, I laugh at terms like "HTML-first website"

I’m sorry I can’t hear you over the Flash animation splash pages I was forced to sit through before being able to look up hours of operation.

Re: Building an HTML-first site doubled our users overnight

#88
post #64

Most of my apps are now simply HTMX + Go + SQLite. I've found it's enough for most projects. One of my sites is image heavy and serves 10 TB of traffic per month. For this, I use the following setup: 1. S3 (I wanted reliable data storage) 2. In front of it, I have Cloudflare (with Tiered Cache enabled, which makes POPs prefer pulling from Cloudflare rather than the origin). I've set rules to cache everything on both…

> I wonder why there isn't a mobile OS that simply lets you build apps with JavaScript, HTML, and CSS and gives you reliable storage without all this effort. There is! You just have to time travel all the way back to 2009 when webOS was launched by Palm. Time travel is the easy part, you then also need to somehow prevent Palms demise and webOS fading into obscurity as a smartphone OS. If 2009 is too far back you can…

Maybe I'm missing something but aren't PWAs pretty dead-simple on both iOS and Android? Maybe it's the "reliable storage" part that's the gap?

Re: Building an HTML-first site doubled our users overnight

#89
post #68

Earlier quoted context omitted.

It's definitely possible to make slow server-rendered website. Most of the slow client-side apps are slow because they're waiting on slow network requests. (I still very much support fast, simple HTML websites. The good ones are a fantastic user experience)

but the host (the company) will need to pay the price in the form of server equipment. Not the user as is the case with client side rendering. If server side rendering becomes slow it will affect all users regardless of their hardware or connection, prompting earlier response from management and devteams.

The cost difference between client-side and server-side rendering is pretty non-existent these days.

Re: Building an HTML-first site doubled our users overnight

#90
post #61

My go-to for spinning up a site has been Jekyll + Bootstrap with the occasional bit of React for well over 10 years now. While it still does the job, I'm a little curious to explore more modern options, if for nothing else to understand the choices a more junior dev would face/make today. I'm seriously considering giving Atro a go. Is it worth it?

Yes
Post reply on HN