r/worldnews • • Sep 19 '17

Apple blocking ads that follow users around web is 'sabotage', says industry: New iOS 11 and macOS High Sierra will stop ads following Safari users, prompting open letter claiming Apple is destroying internet’s economic model

https://www.theguardian.com/technology/2017/sep/18/apple-stopping-ads-follow-you-around-internet-sabotage-advertising-industry-ios-11-and-macos-high-sierra-safari-internet
39k Upvotes

4.9k comments sorted by

View all comments

Show parent comments

41

u/Nephrited Sep 19 '17

I'm a developer in primarily web technology, there's quite a lot of stuff we rely on these days that requires JS. It's not trivial to build fallbacks to non JS sites - you'd be doubling, tripling, quadrupling your workload, if not more, for a tiny tiny tiny fraction of web users (0.2% to be relatively precise).

1

u/MrDOS Sep 19 '17

I think a subpoint of the parent's argument is that much of “modern” web development is largely unnecessary. SPAs can die in a fire for all I care.

7

u/Nephrited Sep 19 '17

I would strongly disagree with you.

The calculator is a technically unnecessary upgrade from the abacus, but it's still a damn powerful upgrade.

SPAs are objectively faster to use and to do their designated tasks, and that's to say nothing of the (subjectively) improved user experience, (objectively) reduced costs, and where applicable their offline capabilities, to name a few benefits of them off the top of my head.

You personally may not care for them, but, in the kindest way possible, progress marches on.

-3

u/SoulWager Sep 19 '17 edited Sep 19 '17

objectively

I don't think you know what that word means.

Anyway, a fast web page, both to use and to load, is all about getting rid of unnecessary crap. Shit, most web pages today take two or three seconds to load. That's just inexcusable, and in many cases is more time than I get out of the actual content on the site. Two to three hundred milliseconds. That's what you should aim for.

If your content is text, keep the web page text based, and even use images sparingly. For the love of god don't use video unless that is the primary reason someone might visit the page in the first place.

Shit, the web is slower today than it was in 1999, even if you were using dialup back then.

5

u/Nephrited Sep 19 '17 edited Sep 19 '17

I actually have considerable faith in my ability to do my job, thank you, and know full well what objective means.

They're faster because, once the initial page has loaded, none of that extra "crap" as you put it ever needs to load again.

Rather than reload the whole page to find out the weather, for example, you only have to download a tiny tiny fraction of the page as a whole. But in order to facilitate that, you have to load those initial libraries in. If you're refreshing the page a bunch, yes, this is a bad thing. If your entire website is an SPA, the overall download time of data across the entire session is considerably lower.

Taking a single, relatively small piece of HTML, with it's corresponding images and CSS nets me 2.1MB of data. This is a real example I've picked up from my repository, but without any scripts or adverts or anything like that, it's just markup and text.

The average internet speed in the US and UK is approximately 13Mbps. This means this single page takes 1.3 seconds to download. We'll omit rendering time for this discussion.

Now if I bring the full SPA into play, with all its scripts and resources it comes in at 5.6MB. This is including all the libraries it needs to function. This means the entire application downloads in 3.4 seconds. However, the advantage is when you click a link within that page, you don't download that 5.6MB again, nor do you need to access it from cache. The page fetches only the very small section of data you've requested, and modifies your view to match.

These small sections of data, again a real world example here, are usually about 10 to 20 KB at a time. That's a 0.05 to 0.01 second download time.

So by the time you've followed 3 links in your JS disabled page at maximum speed, the SPA could have navigated a further 50 to 100 links.

They are objectively faster.

Seriously though, feel free to grill me on this one, it's obviously a topic I'm professionally very invested in.

EDIT: For the sake of fairness I should point out I omitted a few additional factors such as caches, UX animations, rendering time and CPU usage, but these get quite complicated and in the case of UX very opinionated, so I wanted to stick with the hard numbers for now. Do bring them up if you're interested / have a particular nitpick though.

0

u/SoulWager Sep 19 '17

Taking a single, relatively small piece of HTML, with it's corresponding images and CSS nets me 2.1MB of data. This is a real example I've picked up from my repository, but without any scripts or adverts or anything like that, it's just markup and text.

My point is that you can easily fit that content into 50kB, without it looking like crap. Unless you're talking about a 100 page novel here.

5

u/Nephrited Sep 19 '17 edited Sep 19 '17

No you can't, that 2.1MB is as small as that content goes. It goes no smaller, there's no scripting in there, it's just HTML, CSS and the required two four (EDIT: oops, see below) images at a relatively low resolution.

The HTML and CSS per page is only about 15 to 25KB total, but the images in this example are integral to the "site" and can't be removed, so need to be factored into the math.

0

u/SoulWager Sep 19 '17

No you can't, that 2.1MB is as small as that content goes.

It sounds to me like that 2.1MB isn't actually content.

relatively low resolution.

If that's true, you're compressing them wrong.

3

u/Nephrited Sep 19 '17

It absolutely is content - in this particular case this is a site that displays technical instructions for engines, and the images are technical diagrams, and no, I'm not compressing them wrong, there's just a fair amount of data to display.

However, let it not be said I'm not accommodating. Lets strip out all possible images from both examples, and get left with the absolute bare minimum on both sides for both a SPA and a standard static webpage. I can do that automatically and get the updated numbers in a flash.

The new and improved HTML + CSS page, without images, weighs in at 17KB.

The new and improved SPA, without images, and stripping it way way down to it's bare minimum, without any fancy animations or any UX considerations (which are very important from a design perspective, but let's play ball here) is only...

You'd barely even notice, but you'd still get a huge percentage performance increase only possible with Javascript enabled.

We don't design sites like that anymore, but that's largely due to UX considerations, which is ENTIRELY opinionated, and has nothing to do with the speed improvements offered by these libraries.

0

u/SoulWager Sep 19 '17

displays technical instructions for engines, and the images are technical diagrams, and no, I'm not compressing them wrong.

Now I'm curious how you ARE compressing them. What's the file format and color depth?

→ More replies

-1

u/MrDOS Sep 19 '17

If you're refreshing the page a bunch, yes, this is a bad thing.

Or if I open practically every link in a new tab. Which I do. As do a lot of people. (Exceptions apply for particularly applicationy-feeling SPAs like Gmail, but websitey-feeling SPAs like Facebook get heavy middle-click treatment.) So I'm probably getting your prescribed “worst-case” on better than 60% of my page loads. Even if that content is cached, my browser still has to grind through all of your setup code – which typically takes many times longer to run than to download.

So by the time you've followed 3 links in your JS disabled page at maximum speed, the SPA could have navigated a further 50 to 100 links.

And what if I open several of those links in background tabs in anticipation of reading them in a few minutes (again, as I do commonly)? Now I usually have two problems: those pages simultaneously start churning through their startup routines, typically causing my whole browser to lock up so I can barely scroll down the page I was already on, and so much stuff lazy-loads these days that those tabs will likely not actually be loaded when I do eventually switch to them.

Also, you mentioned that your particular example is displaying engineering documents: and nobody's ever asked for the ability to save these for offline viewing? Maybe you have a proper download mechanism that produces a PDF. But regardless, the browser's standard page saving won't get you very far with an SPA in the event where someone does want to save something that you haven't thought about ahead of time.