Live data from Hacker News

Websites have evolved back to static HTML/CSS/JS files

paramaggarwal.substack.com

131–140 of 313 posts

Re: Websites have evolved back to static HTML/CSS/JS files

#131

No, the SPA hype has warn off and people realize that although these new technologies exist, they are not always needed. If you are building a web app, use React or similar. If you are building a web site, use plain HTML+CSS w/ supplemental JS. Sometimes your project can be split in half. Do the landing page, signup, login, privacy policy, etc. in plain HTML. Maybe don't embed all that stuff in your app and you would…

> If you are building a web app, use React or similar.

I disagree with this, there's no reason to use React/Vue/Angular for a web app by default. And I would urge people to try and avoid it for as long as possible and see how far you get. From personal experience I can tell you that most of the time, you don't need a frontend framework to build a web app.

Re: Websites have evolved back to static HTML/CSS/JS files

#132
post #48

Earlier quoted context omitted.

Then you dont have a sustainable business model. Why should I subsidize your failed model ?

Yet you somehow think charging content providers for using your computer when they give you free content isn’t a failed business model?

If someone gave you a set of unassembled Ikea stuff and you didn't know if you could use it until you assembled it.

Who should pay for the assembly of the stuff ?

Would you put it together for free just to decide ?

Who pays for the used resources ?

Re: Websites have evolved back to static HTML/CSS/JS files

#133

We've been building Levels.fyi as a static website for the past 3 years! To create a new page, we simply hit new file on our text editor and start to fill the page. We have a simple build system + templating with Gulp and Nunjucks, but its really all we need. Scaling a static site is incredibly nice & cheap too :P

> Scaling a static site is incredibly nice & cheap too :P

And secure. The only back end systems to attack are load balancers and web servers -- if you're self hosting those then just make the file systems read-only and now you're talking seriously tough security barriers between you and an attacker.

Re: Websites have evolved back to static HTML/CSS/JS files

#134

Earlier quoted context omitted.

SPAs being the darks ages is over-the-top, but being an SPA when other web architectures could better serve the user is a dark pattern . That tax app doesn't need to be an SPA. JavaScript powered interactions make the experience nicer for the user, but that doesn't mean it needs or is improved by being a single page.

No, it doesn't need to be, but it is nicer . There's quite a lot of complexities to my country's tax law (as with any country's tax law, really) and it's heavily simplified by giving you highly dynamic choices. Trying to use my country's immigration site, which has some JavaScript sprinkled on but is largely static, is a largely inferior experience.

There's no reason you can't query a backend for the complexities and present those dynamically to the user. For instance, quite often an SPA might ping the backend for a list of states or provinces once you've selected a country.

Re: Websites have evolved back to static HTML/CSS/JS files

#135
post #27

We are not going back full circle. We are facing new challenges and realizing how complex web development is. 1- There is no simple CSS start point; unless you don't want to be responsive, support mobile/tablets, add a print stylesheet. Then you have thousands of line. Time to add a pre-processor like Sass because CSS was not designed for such complex use cases. 2- There is no simple HTML either. Are you going to mem…

> because who wants to reload the page multiple times happily, please, yes. The browser caches pretty much everything but the HTML, so the payload is minimal. A fast SSR site is a dream compared to the myriad poorly implemented SPAs out there. It's ridiculous going to, for example, an airline site; trying to book a flight and discovering that the damn reservation process is borked due to an uncaught exception in the…

>> because who wants to reload the page multiple times

> happily, please, yes.

A yes please from me, too. I like knowing, for a fact, that the input I gave your website made it to your server, your server processed it, and then I got back a response.

What I don't like is providing some data in a form, submitting it, being told, "Got it, buddy!", moving to another page on the site and then getting an error saying, "Acccctually something fell over. Sorry guy. Try again?"

Give me that slower but guaranteed feedback.

Re: Websites have evolved back to static HTML/CSS/JS files

#136

This is something that I see espoused by "web traditionalists" for lack of a better term. Sure, there are a lot of web developers who are not optimising for performance but I think the difference is that it has simply shifted to the frontend where it's more noticeable. The kinds of people who care about performance in the backend are exactly like the kinds of people who care about performance in the frontend. There's…

SPAs being the darks ages is over-the-top, but being an SPA when other web architectures could better serve the user is a dark pattern . That tax app doesn't need to be an SPA. JavaScript powered interactions make the experience nicer for the user, but that doesn't mean it needs or is improved by being a single page.

If it's a web-based user interface as this tax app sounds to be, it is arguably improved purely by being an SPA. Requiring full page reloads just to submit or change some tiny bit of data in a page is objectively bad UX.

Re: Websites have evolved back to static HTML/CSS/JS files

#137
post #38

Earlier quoted context omitted.

I do Netflix, Prime Video etc etc

That's paying for content, but isn't really what we're talking about. Hacker News is a better example. It's generated entirely server-side. Why not pay YCombinator a few cents for every page load?

If HN had content worth paying for they could charge for it.

Re: Websites have evolved back to static HTML/CSS/JS files

#138

Good. I could do without the JS, to be honest (I'm a little tired of pages that refuse to show me anything unless I whitelist some stupid third-party jQuery script in uMatrix), but, baby steps. When sites finally ditched their trendy Flash rewrites and went back to HTML, I thought, thank God .

When flash was dying I said it was a bad thing because ads would no longer be contained in these tidy, controllable virtual machines sitting adjacent to the page content but instead would be redone in JavaScript in a huge soupy mess where the content is held hostage by ads that slide in and out of the screen and cover content, popping in and out of existence, reflowing the page, making the content jump around and disappear as terribly coded flash apps become terribly coded JavaScript modules slogging the whole browser along with it.

People thought I was wrong and insane. I wish I was. Realistic assessments are always less popular than hope and principles. Flash was the good times.

Re: Websites have evolved back to static HTML/CSS/JS files

#140
post #22

Earlier quoted context omitted.

As long as old and compact reddit are still there, I'm fine with it. Twitter on other hand has no lightweight version, unfortunately.

I think I recall someone mentioning there is one that you get if you send an empty User-Agent.

If JavaScript is disabled in your browser and you visit mobile.twitter.com, you get a link to proceed to "legacy Twitter", which is their pre-React mobile site.
Post reply on HN