34 points · by mpweiher · 7y ago · 99 comments
Anyone fancy going through the AMP library and inspecting it for cruft?
I just don't get it. Maybe it works great in the Google News app, but nowhere else I've seen and I refuse to use Chrome on Android. With the lack of ad blocking the web is borderline unusable on a phone.
AMP’s main benefit has been making it harder to do expensive things. (Not impossible, by a long shot; merely harder.) And they’re deliberately planning to scuttle that benefit by allowing you to run your own scripts (see worker-dom). At that point, I believe that the only benefit of AMP will be how Google search treats it, rather than anything about actual performance.
Its sole purpose is to enable safe prerendering. If you think it's supposed to make things hard, you don't understand it at all.
If option one makes prefetching possible and option two doesn't, why would a comparison with prefetching be unfair?
(Signed exchanges could in theory change this and allow safe cached serving and prefetching of arbitrary HTML pages, but the crowd that hates AMP seems to despise signed exchanges even more. Such is life.)
Incidentally, there was just a large scale study made on the performance characteristics of AMP in the real world.
https://blog.apnic.net/2019/08/08/amp-up-your-mobile-web-exp...
TL;DR is that the AMP pages from the origin were loading on average in 3.1 seconds compared to 7.7 seconds for the matching HTML. (Not all sites are as diligent as you about keeping their HTML light). And then pre-rendering sped that 3.1 seconds to 1.2 seconds. Though the bandwidth used for the prefetching was more than I would have expected.
I sheepishly haven't even seen an AMP page yet because I rarely surf on mobile. But it seems like you'd click into an HN AMP page from google results which of course is cached unauthenticated. And then you'd have to click into the website proper if you want to up/downvote or write a comment.
That kind of thing will prevent rendering unless you wait for the timeout, which is 60 seconds I think, and then content will appear.
- Wait a few months until amp pages become as heavy, and then heavier than their html counterparts.
Amp is at best a hacky temporary patch, it doesnt solve the problem.
Wait, does this mean that websites could serve plain HTML but set this flag and this avoid being penalized by Google? Win!
https://www.google.com/xjs/_/js/k=xjs.av.en.1ic8JaUStX4.O/m=...
Ask yourself... Is that really the minimum amount of script needed to render a basic fast text and images only webpage? Notice the handcoded crypto functions? Notice the copious numbers of debugging functions and log messages and error messages? Notice the large numbers of copyright notices and complete license texts.
This stuff, if Google's dream comes to fruition, will be downloaded billions of times per day. For every byte of cruft in this file, an ethernet cable needs to be installed/upgraded somewhere.
We shouldn't let Google get away with such massive inefficiency in the name of efficiency.
I don't know much about javascript, but could someone explain what happens with the 20 that don't get caught? Do they bubble up and get caught by another "catch"? Or is this indicative of lots of "holes" in the code path?
Who's right? Is everyone else breaking copyright agreements?
I'm seeing an "expires" tag of "now", a cache-control header of 'private' and 'max-age' of 50 minutes. You'll also see the 105KB Javascript used to support animated gifs, 46KB amp-bind which allows documents to "add interactivity", and several others.
"Compiling HTML" would've been Star Trekian techo-babble a few years ago. And yet, here we are, where a straight-faced Google developer advocate is telling us to do just that. Should we laugh or should we cry?
The days of maintaining two versions of a website - a "mobile version" (in AMP) and the normal - are back again. Takes me back to the WAP days (not saying it's that bad). Then there are those that are going AMP-only - getting locked into AMP and all the excessive-yet-limited JS baggage (try building a full-fledged site and you will have a lot of AMP JS). JS compilation and execution isn't cheap on phones either. I sure as hell can make faster-rendering sites without that AMP bloat that can compete despite their prefetch.
This proprietary tech isn't helpful and is a massive dev resource sink. And let's not kid ourselves, there were many better ways for Google to prioritize and encourage speedy websites.
That's not the goal, though. Better tracking of your social graph is the goal of AMP. It's like alt.test to see how fast your link propagates, and where it goes. Useful information for influencing you and others.
But its all just javascript, html, and css. It is the open web. They're also taking bits, like Signed Exchanges, to the standards bodies to make then "standard web" as well.
Is there a term for creating something with two purposes? Where one seemingly benevolent purpose hides a malevolent one?
I mean many of their actions, on the surface, could be euphemistically called "helping humanity" when in reality they're only helping Google.
Penalizing non-https sites: "we're making the web more secure" - and lock out advertisement surface to the benefit of our ads quasi-monopoly (admittedly, a weak case though)
Android Stagefreight bug: "we're disabling MMS to protect Android users" - and by the way close a channel for easy publishing with carrier billing that is part of the highly regulated 3G/4G stack
HTML5: "we're advancing the web and make it fully portable" - and also capture HTML standardization and make it so overcomplicated and never-ending that even MS (and long-time pioneer Opera) are forced-out of producing web browsers alltogether
User -> Internet -> Website
Into
User -> Google -> Internet -> Google -> Website
So that they can sell more ads.
Received 150+ Billion searches
Solved 48.96% of those searches without a click
Sent 6.01% of all searches (~12% of search clicks) to websites owned by Alphabet, Google’s parent company
Directed a click to non-Alphabet-owned websites (aka, the rest of the web) after 45.03% queries
https://sparktoro.com/blog/how-much-of-googles-search-traffi...
" AMP SSR is for everyone
If you publish AMP pages, you should publish server-side-rendered AMP pages. Similar to minifying your HTML or CSS, running AMP Optimizer or the Go transformers should be a normal part of your build / rendering chain. The improved rendering performance makes a big difference in FCP times, but more importantly, in the user experience.
" Other than being the most heavy handed, imperative/authoritarian style call to arms I've seen, the part of this that really bakes my cake is "makes a big difference... in the user experience." Ya know what makes the experience of visiting my website great for a user? When they actually visit MY website. It's like, the single most fundamental part of a website visiting experience. When their browser and my server host kanoodle around in cyber space together, instead of having some creepy cuckold experience involving Google's server. So I'm thinking that AMP, and all derivative technologies, should really make like 'Google Health' and retire to the trash bin.