Remix.run Logo
unglaublich 3 days ago

Building a sub 512KB website is trivial.

Just don't use external trackers, ads, fonts, videos.

Building a sub 512KB website that satisfies all departments of a company of non-trivial size; that is hard.

bilekas 3 days ago | parent | next [-]

> Building a sub 512KB website is trivial.

Even for larger sites, it can be trivial, but I prefer to look at it from a non SPA/state-mgmt point of view.

Not every site needs to be an SPA. Or even a 'react app'. I visit a page, record your metrics on the backend for all I care, you have the request headers etc, just send me the data I need, nothing else.

It doesn't have to be ugly or even lacking some flair, 500KB is a lot of text. Per page request, with ootb browser caching, there's no excuse. People have forgotten that's all you need.

> People have forgotten that's all you need.

Edit : No they havent, they just can't monetize optimizations.

EMM_386 2 days ago | parent [-]

You don't even need a framework for a SPA.

I have a SPA that is just vanilla web components and is clean, small, fast and tidy. No outside frameworks, just my own small amount of transpiled TypeScript.

I prefer to write them that way because it meets my needs for the particular site and is very responsive. But I've also done PHP, ASP.Net, Rails and other server-side work for many years. Best tool for the job, and sometimes they are very different.

benchly 3 days ago | parent | prev | next [-]

I thought that too assumed my blog fit the criteria. I was wrong; weighed in at just over 100KB too heavy to get in the club.

My guess is the photos.

unglaublich 2 days ago | parent | next [-]

Exactly, so it's not so much a demonstration of how nice a website fits in 512K as it's about _just not using any media_. Not very interesting imho.

theandrewbailey 2 days ago | parent | prev | next [-]

Same here. You can join me in the https://1mb.club/

benchly 2 days ago | parent [-]

Hah! Maybe for now, but I'll probably pass that with a few more posts I have in the works. They're related to some projects I have going (that I will eventually finish), which means more photos.

What I really need to do is standardize my format and size, just to make things a bit more visually tidy. I'm not all that interested in keeping below a certain size, more so that I'm not doing anything I consider unnecessary for the function and feel of the site. Fairly certain whatever readership I have is either related to me or people I play D&D with, so it's really just a fun thing for me to do once in awhile.

est 2 days ago | parent | prev | next [-]

I ran a pretty lightweight blog, but sometimes several .jpg would easily cost >512KB

NooneAtAll3 2 days ago | parent | prev | next [-]

maybe lower the resolution?

at least to test your guess

bjord 2 days ago | parent | prev [-]

are you using webp photos?

theandrewbailey 2 days ago | parent | next [-]

WebP isn't enough of an improvement to justify the overhead of supporting it for me. AVIF is twice as efficient as JPEG, and has 97+% support across browsers. Use <picture> for JPEG fallback.

https://caniuse.com/?search=avif

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

daemonologist 2 days ago | parent | prev | next [-]

webp is not much of an upgrade in my experience - jpegli pretty much matches it in quality/size while having better compatibility, and if you don't have the original photo and are working with old crusty jpegs it's often best to just leave them alone rather than re-encoding. jpeg-xl does make a noticeable difference, but it's not widely supported.

gruturo 2 days ago | parent | prev [-]

Webp is utter garbage. Awful quality loss, which they're still in denial of, for minimal size gains over a jpeg encoded with modern software (which is also way way more compatible - software from 35 years ago can open it). But I'm sure it scores well in whatever flawed perceptual benchmark they automated.

If only google didn't oppose jxl - but they'd have to implicitly admit that webp is garbage and they don't like doing that.

acdha 2 days ago | parent [-]

WebP produced good file size reductions because they recompressed JPEGs and ignored the loss in detail. I benchmarked it the day it launched and it was never once competitive enough to be worth the cost of using it. If browsers had supported JPEG-2000 in the 2000s, it’d have stomped WebP on every benchmark – even a tuned JPEG encoder did surprisingly well given the age of that format.

HEIC, AVIF, JXL, etc. are worth the trouble.

snovv_crash 2 days ago | parent | prev | next [-]

Literally yesterday there were people defending 15MB websites:

https://news.ycombinator.com/item?id=45798681

cnnlives73 2 days ago | parent | prev | next [-]

> Building a sub 512KB website that satisfies all departments of a company of non-trivial size; that is hard.

I’m all for minimalism and have a much lower target than 512KB for some of my work. But I think the goal of having the entire site in 512KB is a little strange; someone might have a 511KB SaaS SPA app while others struggle to have 51 10KB pages. That’s not the same.

zahlman 2 days ago | parent | prev [-]

> Building a sub 512KB website that satisfies all departments of a company of non-trivial size; that is hard.

And yet tons of personal blogs likely weigh in well over that mark, despite having no requirements beyond personally imposed ideas about how to share information with the world.

> Just don't use external trackers, ads, fonts, videos.

The Internet is likely full of "hero" images that weigh more than 512KB by themselves. For that matter, `bootstrap.min.css` + `bootstrap.min.js` is over half of that budget already.

Not that people need those things, either. But many have forgotten how to do without. (Or maybe bilekas is right; but I like the idea of making things small because of my aesthetic sense. I don't need a financial incentive for that. One of these days I should really figure out what I actually need for my own blog....)