top | item 20565801

(no title)

zazaraka | 6 years ago

So true. Just like high definition video or images.

This bill should also ban: large hero images, serving more than 500 KB of JavaScript, making more than 50 HTTP calls when loading a page, causing the fans to spin up when loading the page, unnecessarily using web fonts.

Banning these things would make the web so much better.

discuss

order

tenebrisalietum|6 years ago

It'd be awesome to have an extremely lightweight protocol that lets you get the size or approximate size of a resource before download. Maybe a new HTTP method like SIZEOF.

But how to make it truthful? Other than client cutting off download at the expressed limit. Would that be good enough? And how to express "fuzzy" sizes like "at least 1MB but might be a little more or less".

NateEag|6 years ago

I believe you want HTTP HEAD. It's defined to return the same response as a GET but without a body. You can therefore look at the Content-Length response header to see what actually issuing a GET will cost you.

The server should not return fuzzy content lengths: your client should have soft limit ranges rather than a single hard limit.

Of course, the server is not required to support HEAD, nor is it required to include Content-Length, which touches on your real complaint:

Programmers get to write programs the way they want to, and most of them don't share your value of preserving bandwidth and using progressive enhancement.

That is a relational and human problem. There is no technological solution to it.