Live data from Hacker News

JavaScript growth and third parties

speedcurve.com

61–70 of 77 posts

Re: JavaScript growth and third parties

#61

Earlier quoted context omitted.

It is entirely possible to build rich web apps with very small size. As shown in the article, the main source of bloat are 3rd party scripts: ads, tracking, metrics, retargeting, security...

Everyone here is the choir... Now convince the client that they don't need to track every single possible click of the user - as they experience their "journey" through the site... ...convince the client that all those experience designers effusing about that "emotional layer" they added to that user journey didn't really result in 30% more engagement with the brand - as evidenced by exactly that same user tracking -…

I keep JS disabled so most of this crap don't bother me.

Re: JavaScript growth and third parties

#62
post #18

Earlier quoted context omitted.

It's 6MB (closer to 7 if you round it). https://twitter.com/mikemaccana/status/1073538289582436352

did you just compare a bundle size with the modem bandwidth?

Not the JS bundle (if that's what you mean), the site itself (to get to the point where you can use gmail).

And yes, why wouldn't I? My 50Mb/s cable modem can download the fully featured Fastmail (500K) 13x faster than GMail. That's how bandwidth works.

Re: JavaScript growth and third parties

#64

I don't understand why JavaScript is so ubiquitous now. There seem to be very few cases where it is actually necessary and useful (e.g. a calculator form that does computations client side that would otherwise overwhelm the server). I am constantly surprised at the number of sites that should be totally static (e.g. a local restaurant's menu page) that display nothing at all when I visit with JavaScript disabled. Can…

> I am constantly surprised at the number of sites that should be totally static (e.g. a local restaurant's menu page) that display nothing at all when I visit with JavaScript disabled. I am constantly surprised at the number of people that explicitly disable JavaScript to make their lives difficult in 2018. My point is, JavaScript makes it easy to build nice websites at scale. Plenty of CMS platforms (like Wix.com)…

> JavaScript makes it easy to build nice websites at scale

> build nice websites at scale

> at scale

What? Might as well mention ML & blockchain while we're at it.

If site is not interactive, it doesn't _need_ JS.

If it does need JS, it more than likely needs _sprinkles_ of it.

Re: JavaScript growth and third parties

#65

Earlier quoted context omitted.

Also, JS is cached. First time will be slow, others, not so much The mainstream libraries are fast and optimizable (Angular/React/Vue/etc). Other, not so much.

> Also, JS is cached. First time will be slow, others, not so much This is a very weak argument. * many 3rd party resources are not cacheable or may have bad policies * caches may be more often cold then you expect. most apps still cache large combined blobs, which will invalidate with each release. * pure JS size has still it's impact on performance * caching won't magically cut all network roundtrips which you need…

Yes, but you can optimize your website for caching. Your points are valid but they mostly boil down to "people don't know/don't care what they're doing", which won't help even if you don't have JS in your site.

And it is: "still its impact"

Re: JavaScript growth and third parties

#66

Earlier quoted context omitted.

> I am constantly surprised at the number of sites that should be totally static (e.g. a local restaurant's menu page) that display nothing at all when I visit with JavaScript disabled. I am constantly surprised at the number of people that explicitly disable JavaScript to make their lives difficult in 2018. My point is, JavaScript makes it easy to build nice websites at scale. Plenty of CMS platforms (like Wix.com)…

> JavaScript makes it easy to build nice websites at scale > build nice websites at scale > at scale What? Might as well mention ML & blockchain while we're at it. If site is not interactive, it doesn't _need_ JS. If it does need JS, it more than likely needs _sprinkles_ of it.

By "at scale", I mean building abstractions on top of commonly used html elements and making them interactive, using something like "components" in React. Then you only need to write the shopping cart or image gallery once, and users of website builders can just click a button to add it to their website.

Also, interactivity almost always gives better UX than static websites, if it's done properly by a professional website builder like Wix or Squarespace. So there's not much to hate it except maybe a few MB of extra code that you need to download.

I can't think of any good use cases for static websites in 2018, except maybe blogs in pure plaintext or old fashioned forums. Even HN has JavaScript for that little bit of interactivity (collapsing comments).

Re: JavaScript growth and third parties

#67
post #8

While I do acknowledge that increase in generic third-party things like ads and trackers definitely plays a certain role here isn't the study is kind of moot unless sites with similar feature sets are compared.

You can compare site's performance with it's performance under uMatrix or even uBlock. The amount of nonessential third-party JS is really a big problem.

Re: JavaScript growth and third parties

#68

I don't understand why JavaScript is so ubiquitous now. There seem to be very few cases where it is actually necessary and useful (e.g. a calculator form that does computations client side that would otherwise overwhelm the server). I am constantly surprised at the number of sites that should be totally static (e.g. a local restaurant's menu page) that display nothing at all when I visit with JavaScript disabled. Can…

It tends to be things like trackers that report back what browser versions, supported plugins, cookies for directed adverts.

I suppose I should 'view source' to check a few, but are local restaurants actually using tracking code on menu pages?

I'll by the lazy developer / uninformed business owner explanation or the flash cancer analogy, but the tracking explanation seems a little far-fetched.

I get that Facebook, Amazon, Apple, and Google are all running ad networks trying to track me, and that globally this accounts for most of the bloat.

I'm trying to understand the dynamic that causes what should be simple static websites to use JS in such a way that they display no information at all when JS is off.

Re: JavaScript growth and third parties

#69
> In terms of the number of JavaScript requests, first party has gone up 50% from 4 to 6 requests, whereas third party has increased 140% from 5 to 12 requests.

> Third party growth in terms of JavaScript size is more alarming. First party JavaScript doubled from 53 KB to 106 KB. Third party JavaScript octupled(!) from 32 KB to 258 KB.

one more reason to use NoScript

Re: JavaScript growth and third parties

#70

Earlier quoted context omitted.

> JavaScript makes it easy to build nice websites at scale > build nice websites at scale > at scale What? Might as well mention ML & blockchain while we're at it. If site is not interactive, it doesn't _need_ JS. If it does need JS, it more than likely needs _sprinkles_ of it.

By "at scale", I mean building abstractions on top of commonly used html elements and making them interactive, using something like "components" in React. Then you only need to write the shopping cart or image gallery once, and users of website builders can just click a button to add it to their website. Also, interactivity almost always gives better UX than static websites, if it's done properly by a professional we…

> By "at scale", I mean building abstractions on top of commonly used html elements and making them interactive,

This sounds like double-speak. That's not what at scale refers to, even allowing a very loose definition.

How the HTML is generated is moot. Server side templates had re-usability at a "component" level. iFrames exist, redirects exist.

I'm not saying all JS is bad. I'm saying too may new people seem to think JS in and of itself is magic and there is no other way to generate/manipulate the DOM or talk to other computers.

I'm bailing out of this conversation now because you're heavily conflating HTML, browser functionality and www fundamentals with website builders(i don't know why you felt the need to qualify it with "professional")

> Even HN has JavaScript for that little bit of interactivity (collapsing comments).

Yeah no, "even HN" works perfectly with JS blocked. JS for HN is an enhancement, not a requirement. They understand how the web can work...

Post reply on HN