Hacker News new | ask | show | jobs
by 3xblah 2593 days ago
"Web pages are made up of dozens (sometimes hundreds) of separate resources that are loaded and assembled by the browser into the final displayed content."

Could that be the reason that that the web needs to be "faster" (despite tremendous advances in CPU, storage, bandwidth and network speeds)?

The dozens (sometimes hundreds) of separate resources are loaded by default.

What is their purpose? Where do they come from? Are all of them necessary?

What if an advanced user could tell the browser to only load certain resources from certain sources?

For example, maybe skip certain ads and tracking, as specified by the user.

Perhaps do not load the Facebook "Like" buttons (images), but load all other images.

Control exactly which Javascripts to load.

In addition to the options that browsers now provide, provide more fine-grained controls.

Could that make the web faster?

A bonus would be if these user-defined, fine-grained browser settings could be saved in a portable, interoperable format, e.g. to external media, in addition to being able to save them to "the cloud" (which may be servers run by advertising-supported browser authors). Browser authors do not need to know which resources users may wish to block.

4 comments

80%, if not more, of what you describe is do-able with Raymond Hill's uMatrix [0]. And yes, it does make the web faster and safer, though it breaks certain websites.

--

[0] https://github.com/gorhill/uMatrix/blob/master/README.md

True, there are ad-ons to address such browser deficiencies. The question is why browsers do not have these capabilities natively. Clearly, a large number of users want them.

Note that the 20% in your estimate are quite significant.

As for "breaking websites", perhaps in the evolution of a web to be faster, those "certain websites" with too many third-party dependencies should be selected against, not for.

Another interesting question is whether something like HTTP/2 developed by an advertising company encourages the inclusion of more third-party resources, perhaps in the form of advertising and tracking, or does it encourage less, in the form of smaller, faster, safer websites? It appears to be overkill for the later.

Firefox seems to be in the process of gradually implementing a lot of user privacy and control measures.
>The question is why browsers do not have these capabilities natively.

Money.

Humans don't naturally optimize down to the byte level, be it a whole foods cashier who takes an extra 30 seconds to bag your groceries, an airline who's pilot needs to use the restroom and delays takeoff, or whatever other situation where convenience takes precedent.

When and how often should human hours be spent to optimize machine hours? Sometimes clearly, but should they always? Where is the line? I think these questions define the whole javascript bloat problem, there is no clear answer so it varies company-by-company and developer-by-developer to the detriment of all involved.

> Humans don't naturally optimize down to the byte level,

Who said bytes? You did. Other commenters including myself have mentioned megabytes (ie. six orders of magnitude larger). Nobody said bytes AFAICS.

> When and how often should human hours be spent to optimize machine hours

Oooh, perhaps I can help! Being as I'm currently trying to shave 200 to 300 milliseconds at a time off one stage of a simulation, taking 2 to 6 hours for each optimisation. So 4 to 5 orders of magnitude more programmer time than machine time. That way larger models can be used, and all of multiple multiple sites will benefit, and less of their time will be spent waiting (see disclosure below).

It's not actually that difficult an inequality to solve, except when haystacks of JS and advert crud are pushed on us by advertisers etc. whose money is made by wrecking the commons for their profit so don't want to know.

“It is difficult to get a man to understand something, when his salary depends on his not understanding it.” - Upton Sinclair

disclosure, I'm actually doing this unpaid as I'm getting back into work after illness, however if I wasn't there they'd get someone else in, paid, as it needs doing.

It used to be that websites would optimize their icons by putting them all in a single gif. But this isn't supposed to be necessary anymore.
> What is their purpose?

Icons.

> Where do they come from?

They are designed.

> Are all of them necessary?

No, but also yes.