News for hackers. Stuff that matters.
Re:1MB Club by yellowapple on Thursday November 19, 2020 @02:46PM (#25153563)
I love it!

I feel like the 1MB limit is excessively generous, especially for text-only pages. But maybe that's what makes it so damning when pages fail to adhere to it. I know at least one website I maintain fails it spectacularly (though in my defense it's entirely because of that website being chock-full of photos, and full-res ones at that; pages without those are well under that 1MB mark), while other sites I've built consist entirely of pages within a fraction of that limit.

It'd be interesting to impose a stricter limitation to the 1MB Club: one where all pages on a given site are within that limit. This would disqualify Craigslist, for example (the listing search pages blow that limit out of the water, and the listings themselves sometimes do, too).

I also wonder how many sites 1mb.club would have to show on one page before it, too, ends up disqualifying itself. Might be worthwhile to start thinking about site categories sooner rather than later if everyone and their mothers starts spamming that GitHub issues page with sites (like I'm doing right now).

Re:1MB Club by highmastdon on Thursday November 19, 2020 @03:23PM (#25153913)
Don’t forget that also 1MB of JavaScript is much much more heavy on the client than 1MB image
Re:1MB Club by Lerc on Thursday November 19, 2020 @04:16PM (#25154460)
Indeed, but you also get more bang for your downloaded buck.

My toy project https://k8.fingswotidun.com/static/ide/?gist=ad96329670965dc...

Gives you an emulator, an 8-bit AVR Assembler, and an IDE for just over 500k transferred. Almost all of it JavaScript.

Using math.js is by far the heaviest part but at least your Asm already knows things like solarMass and planckConstant :-). CodeMirror comes in second heaviest but for user-experience-per-byte you're always going to be streets ahead of a gif.

Re:1MB Club by szhu on Thursday November 19, 2020 @05:51PM (#25155308)
True, but clients can opt to not load (or lazy-load) images without too much adverse effect. JS-heavy sites often completely break without JS.
Re:1MB Club by dvfjsdhgfv on Friday November 20, 2020 @05:40AM (#25159153)
Yours is an exception to the rule - in 99% cases for 1MB of JS you get 1 MB of ads/tracking code.
Re:1MB Club by rdumont on Friday November 20, 2020 @03:36AM (#25158476)
> Indeed, but you also get more bang for your downloaded buck.

Yet this is most times used to load React to make a button clickable.

Re:1MB Club by charlesdaniels on Thursday November 19, 2020 @03:42PM (#25154109)
At the risk of over-complicating things, perhaps there could be limits per resource type. 10Mb of images might be reasonable (e.g. for a photojournal), but only 128KB of JS, and 128KB for everything else. Something along those lines.
Re:1MB Club by SilasX on Thursday November 19, 2020 @03:48PM (#25154163)
Yeah I was surprised they included pictures in the limit at all -- I mean, sometimes, you need those pictures, and for them to load slower is less important so long as you don't need them to navigate the page.
Re:1MB Club by corobo on Thursday November 19, 2020 @07:09PM (#25155972)
Well if you need them you can't be a part of this 1MB club.

It's not a bad thing, it's just a thing.

Re:1MB Club by dylan604 on Thursday November 19, 2020 @06:31PM (#25155656)
If you were able to calculate the space in the document flow for those images, I'm fine with the lazy loading. I hate when the page text appears rendered long enough that I start reading, but then lazily loaded items cause the flow to rearrange the text so that I lose my place.
Re:1MB Club by jan6 on Thursday November 19, 2020 @11:50PM (#25157394)
I imagine it should be pretty easy with javascript to set up dummy images, and replace them... probably also doable in pure css, just make them a block element or something, with a set size...
Re:1MB Club by innocenat on Friday November 20, 2020 @12:29AM (#25157566)
You don't have to imagine everything. Normally the lazy-loaded image should be seeded with transparent SVG that as the same dimension. It's a solved problem.
Re:1MB Club by sago on Friday November 20, 2020 @10:23AM (#25161292)
I miss lowsrc. It had a point.
Re:1MB Club by adrianN on Friday November 20, 2020 @12:31AM (#25157576)
Wasn't this what progressive jpeg was invented for?
Re:1MB Club by Aeolun on Thursday November 19, 2020 @04:25PM (#25154561)
I’m not surprised. The whole point of it is that you can reasonably load it over 3g.

If you have a few megs of images that never show up because they take too long to load, there is no point.

Re:1MB Club by phkahler on Thursday November 19, 2020 @04:29PM (#25154613)
You dont really need full size/resolution images on a web page.
Re:1MB Club by SulfurHexaFluri on Thursday November 19, 2020 @05:08PM (#25154952)
You people are why some sites have ugly blurry logos/images on my 4k screen
Re:1MB Club by jan6 on Thursday November 19, 2020 @11:51PM (#25157397)
more the fault of the site devs for not using css media queries, or svg ;p
Re:1MB Club by Dylan16807 on Friday November 20, 2020 @01:02AM (#25157716)
Does getting in the club assume you have a low resolution screen?

SVG only works in a few places.

Re:1MB Club by phponpcp on Thursday November 19, 2020 @04:36PM (#25154682)
You do for full width retina images on 1440p+ monitors.
Re:1MB Club by SilasX on Thursday November 19, 2020 @04:33PM (#25154655)
Yeah true but even with small images, you can hit that cap quickly.
Re:1MB Club by z3t4 on Thursday November 19, 2020 @08:18PM (#25156415)
You could use SVG images.
Re:1MB Club by z3t4 on Thursday November 19, 2020 @08:15PM (#25156398)
Check out this app: https://webide.se/?disable=fonts,discoveryBar

It's over one hundred thousand lines of JavaScript code minified and Gziped into a 300KB bundle which should fully load in about 300ms on a decent computer.

Re:1MB Club by wolco2 on Friday November 20, 2020 @12:53AM (#25157688)
That took 4000ms on a phone.
Re:1MB Club by thomasz on Friday November 20, 2020 @02:27AM (#25158085)
Which is still rather fast. Starting an IDE like Visual Studio on my desktop takes longer.
Re:1MB Club by yellowapple on Friday November 20, 2020 @12:50PM (#25162921)
4+ seconds is hardly "rather fast", and being faster to start than Visual Studio is hardly glowing praise.
Re:1MB Club by z3t4 on Friday November 20, 2020 @01:20AM (#25157776)
What hardware/tools did you use to measure?
Re:1MB Club by epse on Friday November 20, 2020 @02:24AM (#25158071)
It was about the same for me, and I used a simple stopwatch. Stopped the watch as soon as I saw anything on the page. I am on a fairly fast network, too
Re:1MB Club by tibu on Friday November 20, 2020 @04:20PM (#25165105)
For me it wasn't a second on a Honor 10
Re:1MB Club by CarelessExpert on Thursday November 19, 2020 @05:47PM (#25155270)
> I feel like the 1MB limit is excessively generous, especially for text-only pages.

No kidding. I just checked and the average text-only page on my blog well under 100kb. Even the image-heavy front page is under 1MB...

Re:1MB Club by corobo on Thursday November 19, 2020 @07:16PM (#25156008)
I was pleasantly surprised to find the same!

Even the page where I used images came in at juuuust about the limit -- to the point where you'd have to make a ruling of whether the rest of the page gzipped counted because over the wire was technically <1MB but it was just above after decompress. The site does specifically say "downloaded", haha

Re:1MB Club by masswerk on Saturday November 21, 2020 @06:16AM (#25169057)
Personally, I stuck to the 40K best practice recommendation for the basic web page as a target, which was in place when I started. Modified to up to 140K including webfonts. Notably, this is without images.

(This is a flexible target, depending on the complexity of a page. E.g. for a "bloated" page, a fully styled video display for competition winners showing 200+ entries and 280+ individual videos in categorized views is about 250K, including a few images, two and a half font families and the Vimeo Player SDK, but excluding the load of any external video streams. However, with compression we still manage the 140K mark.)

Then reality hits: Client insists on a full-width photographic hero image as it's still 2014. Usual controversies about a full-size intro video (autoplay, of course), we must have this highly intrusive chat asset installed, etc, etc… – And we easily blow the 1MB limit.

Re:1MB Club by josmala on Thursday November 19, 2020 @10:06PM (#25156985)
Something about all pages being under limit the limit instead of every page being under the limit changes the exact meaning to something that I cannot agree with. Which was the meaning I replied below and then wrote this after realizing you might of meant every when you wrote all.

Lets say you write a daily blog. A single A4 of text contains on average 3000 characters, your posts average slightly above that by being 4000 characters. How long until the text content alone is above the 1MB limit.

https://dictionary.cambridge.org/grammar/british-grammar/all...

Re:1MB Club by Retric on Friday November 20, 2020 @01:26AM (#25157799)
I doubt you can find a single text blog on a specific topic that wouldn’t be improved by limiting it’s total text to 1MB.

Being more verbose is generally just poor writing. Now, using a separate website per topic seems like a silly limitation, but the more topics being discussed the less relevant the discussion.

Re:1MB Club by yellowapple on Friday November 20, 2020 @12:53PM (#25162950)
Yeah, I did mean "every" rather than "all", as you put it. Though both would be interesting.
Re:1MB Club by thdrdt on Friday November 20, 2020 @03:18AM (#25158369)
I think an onload limit is much more useful than file size.

A 700kB JavaScript page can take up to 10 sec. to render on older mobile devices. And a 500kB image can contain megapixels which will slow down non-PGU browsers.

Personally I always go for a max 2 sec. limit on all devices.

Re:1MB Club by divbzero on Thursday November 19, 2020 @03:01PM (#25153707)
Agreed. 1MB seems more reasonable as a per-site threshold. Or, alternatively, somewhere between 10kB and 100kB as a per-page threshold.

For context, 1MB is the same order of magnitude as the original Doom which was about 2.4MB in size. [1]

[1]: https://www.wired.com/2016/04/average-webpage-now-size-origi...

Re:1MB Club by Chris2048 on Friday November 20, 2020 @10:31AM (#25161388)
I think it should be relative to content. As in versus actual text on the screen. This metric can also be applied "per-page" and "per-site", with less ambiguity for SPAs; every new load brings in more bytes, but also more text, thereby contributing to the ratio.

Even better - fixed site-wide assets (i.e css, js) to features; hence loading an entire framework only to use a small % of it's features is penalised.

Re:1MB Club by meerita on Friday November 20, 2020 @06:10AM (#25159319)
500kb is even crazy imho, unless you need to display media formats
Re:1MB Club by meshaneian on Thursday November 19, 2020 @07:00PM (#25155916)
Next level: The 1MB Quine Club.
Re:1MB Club by mixcocam on Friday November 20, 2020 @12:14AM (#25157499)
Tiddlywiki
Re:1MB Club by ngcc_hk on Friday November 20, 2020 @12:24AM (#25157549)
Do they check the 1 MB limit?
Re:1MB Club by zer0tonin on Friday November 20, 2020 @03:14AM (#25158344)
Looks like they do yes.