Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This reply means basically nothing to me or anyone.

To expand on what I mean, if the implication isn’t obvious: a SPA with no client side rendering is just a single HTML page. It’s a document, not an application.

So SPA naturally implies client side rendering.

The difference between a SPA and MPA isn’t the amount of pages, they both have about the same amount of logic pages. It’s about where those pages are rendered. Dynamically on the front end, or on the back end.

EDIT: okay okay to expand, my website has a contact form. With JS enabled, the form submit displays a little box that says “thank you for submitting”. With JS disabled, it navigates you to a “thank you for submitting” page.

Both are the same logic page, they have the same function. One page is just rendered client side, and one server side. Most websites or applications are hybrids. There’s very few true single page applications, and very few true multi page applications. Most SPAs have multiple real pages for different things. Most MPAs combine multiple logic pages into one real page.

 help



Single HTML files / pages can be fully-featured, full-purpose-fulfilling applications.

> Most websites or applications are hybrids.

and some are emphatically not.

But…where were you going with that?


The features of HTML are still greatly limited. You can’t really create applications with just one HTML page and no client-side rendering. You can play a video, sure, but that’s not an application. You can also do magic with CSS but that’s an experimental fun thing, not a thing people actually do.

As soon as you, say, use JS to update the DOM or a canvas, I consider that client-side rendering. That you can do, and that would be a SPA.

But I’m curious, what are some examples, even hypothetical, of applications consisting of one HTML page? I don’t think I’ve ever seen it.


You can inline the following in one HTML page:

CSS (.css) JavaScript (.js) Plain Text (.txt) HTML (.html) SVG (.svg) Raster Images (.png, .jpg, .jpeg, .gif, .webp, .bmp) Audio (.mp3, .wav, .ogg) Video (.mp4, .webm) JSON (.json) PDF (.pdf)

plus bring in other source resources as needed.

To answer your question:

The installer for GrapheneOS / Google Pixel phones is an “SPA” (or “webapp”).

I’ve seen bespoke fitness trackers of all kinds,

appliance control apps,

budget and pace-tracking stuff,

basically all of what computer programs used to do - before we started dynamically loading a ton of extra stuff onto the screen that nobody needed to do the task they came to do.


Right, but if you’re dynamically changing the HTML from JS, like the graphemeos website does, then that’s client-side rendering, which is my whole argument. Embedding the JS in HTML makes zero difference, it’s the same thing.

So, they are truly inseparable IMO. You can’t have a SPA without some amount of client side rendering, your example demonstrates that. So, what makes a SPA a SPA is the rendering. A SPA is “single page”, but only in literal meaning. Logically, every SPA is many pages, you just render them purely client-side.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: