
How to Replace Google's AMP Without Slowing It Down - dfabulich
https://redfin.engineering/how-to-fix-googles-amp-without-slowing-it-down-522bc5e1e11d
======
lern_too_spel
The AMP brand is only toxic on HN, among iOS users who don't know any better.
The article itself perpetuates a common mistaken belief among iOS users — that
AMP implements its own scrolling. The problem stems from the root source of
all of the author's listed problems — that AMP uses iframes. Mobile Safari had
a bug where iframe scrolling is different from scrolling in the rest of the
system. On every Android browser, it works just fine.

Similarly, that Mobile Safari's reader mode doesn't work with AMP is simply
because it doesn't understand iframes and doesn't work on canonical URLs,
unlike every other reader mode (both websites like outline.com and browsers
like Firefox) I have used.

The real issue is that Safari is such a buggy, rarely updated browser that
publishers have to choose between speed or UX.

~~~
dfabulich
(Author here.) I think the AMP brand is toxic roughly everywhere.

Many users don't know what AMP is, and don't really care—in fact, there's some
evidence that users like AMP in search results, or at least they like the
performance—but as far as I can see in tech communities like HN and Reddit,
the vast majority of people who know what AMP is also know that they hate AMP.
(Scroll up and down on this thread a bit!)

As for _why_ it's toxic, I don't think we have to agree about that, but it's
not just the UI problem. The URL problem (AMP URLs point to google.com instead
of the original site) is a real, significant problem in its own right.

The URL problem is the root of the claim that "AMP is Google's attempt to take
over the open web."

IMO, if it were just an iOS scrolling issue, AMP would just be controversial:
love the speed, hate the scrolling, eh, it's a wash. But the URL problem is
what really gets the flamethrowers running!

~~~
basch
>in tech communities like HN and Reddit, the vast majority of people who know
what AMP is also know that they hate AMP.

which is an extremely tiny portion of people clicking links on the internet.

~~~
dfabulich
I'm not saying that a significant portion of the world population hates AMP.
I'm saying: take the extremely tiny portion of people who have _heard_ of AMP,
and then estimate how many of them _like_ AMP or _dislike_ AMP.

AMP's detractors are few in number, but they overwhelm AMP's supporters, who
are even _fewer_ in number.

~~~
eli
AMP has a mostly positive reputation in the world of digital publishers--and
they definitely know what it is. I've heard from people at two different
publishers that the decline in traffic due to the recent Facebook algorithm
update has _almost_ been made up by a dramatic increase in Google traffic to
AMP pages. (see [https://www.axios.com/google-traffic-explodes-doubling-
down-...](https://www.axios.com/google-traffic-explodes-doubling-down-on-
mobile-news-ad69c8ec-b44e-4d63-8995-a3e6869e8002.html))

The main complaint I hear is that AMP pages are pain in the ass to produce,
not anything about walled gardens or canonical URLs. Consider that most of the
people making decisions are weighing AMP strategically against FB Instant
Pages.

~~~
donohoe
No. As someone who works in media/publishing I’m gonna disagree there.

I can speak for colleagues across many publishers too. Within the industry
it’s hated.

There are implications for ad revenue too that I’m not going to go into here.

Don’t get me wrong, some love it but more hate it - for a variety of reasons.

~~~
eli
Well if you believe the data from Chartbeat, a whole lot of publishers are
going through the non-trivial effort of publishing in AMP even if they don't
like it.

~~~
reificator
It's funny: If you ask what people think about being held at gunpoint they're
not usually very keen on it.

But when I hold them at gunpoint and tell them to dance like a chicken, they
all do it. Doesn't seem like they hate it after all. Sometimes they even cry
tears of joy...

------
martin_drapeau
> Yes, AMP pages load fast, but you don’t need AMP for fast-loading web pages.
> If you are a publisher and your web pages don’t load fast, the sane solution
> is to fix your [fricking] website so that pages load fast, not to throw your
> hands up in the air and implement AMP.

I'm a developer and took some time to analyze AMP from a developer's
perspective. The above conclusion is the only sane one. AMP, Web Packing
Standard, damn proxy - they are all workarounds that complicate things. Don't
be lazy - fix your shit and make your website fast.
[https://medium.com/@martindrapeau/amp-for-developers-the-
tec...](https://medium.com/@martindrapeau/amp-for-developers-the-technical-
and-seo-perspectives-b1becd64e66d)

~~~
dfabulich
(Author here.) You and I agree that AMP has serious problems, but your article
doesn't evaluate the Web Packaging standard at all, which is the whole point
of the article.

Prerendering is faster than the fastest web site you can build, faster than
[http://motherfuckingwebsite.com/](http://motherfuckingwebsite.com/), as fast
as switching tabs.

On noisy cellular networks, where even one network request can take seconds,
even the fastest sites can be slow; prerendering can fix this.

I don't think it makes sense to say, "Prerendering makes even the fastest
sites faster?! Bah, humbug! Web sites are fast enough if you do them right."

Web sites _are_ pretty fast if you do them right. But making them even faster
is hardly _lazy_.

------
JoshMnem
The WWW is supposed to be decentralized. There shouldn't be one (or a few)
companies that host the Web. I don't want Google to visit sites on my behalf.

~~~
dfabulich
(Author here.) That's what's so great about the Web Packaging standard
proposed in the article to replace AMP: everybody could use it.
[https://github.com/WICG/webpackage](https://github.com/WICG/webpackage)

Even HN could serve up prerendered Web Packages for all of the sites on the
front page.

The result would be a _more_ decentralized web.

~~~
JoshMnem
Why would other sites be motivated take on the extra bandwith loads?

Downloading websites before even clicking on the links seems like a huge waste
of bandwidth for a problem that could be mostly solved by:

\- writing better HTML

\- stop writing bloated UIs with too much JS and CSS

~~~
dfabulich
They'd take on the bandwidth load in order to provide better performance for
their users!

Maybe HN wouldn't bother, but I think, say, Reddit would do it if experiments
showed that prerendering links resulted in higher engagement on Reddit. (And I
bet it would; don't you agree?)

~~~
JoshMnem
Wouldn't that just give an advantage to large sites with tons of cash at the
detriment of smaller, independent publishers? If hosting other websites
increases the engagement on Site X, users might say, "getting my news on Site
X is faster than getting my news on <small_independent_website>."

You might be right, but something about it sounds off to me. We already have a
working system. It's being abused by bad HTML/JS/CSS, but there are ways to
fix it without unbalancing the open nature of the WWW.

------
whyagaindavid
AMP can be hosted by 'YOU'. See Guardian.com 's own AMP cache. It is not
google taking over the web.

[https://amp.theguardian.com](https://amp.theguardian.com)
[https://www.theguardian.com/membership/2016/feb/24/todays-
re...](https://www.theguardian.com/membership/2016/feb/24/todays-release-of-
accelerated-mobile-pages-amp)

~~~
zingmars
Does google respect self-hosted AMP caches and will link to them instead of
theirs in search results?

~~~
dingo_bat
It would defeat the most important purpose, the pages won't be as fast. So I'm
guessing they won't.

~~~
ec109685
And it wouldn’t be secure.

------
peterwwillis
We used to have applications.

Applications were a thing you downloaded once and ran locally. They did things
offline. If you needed something extra, it could communicate with a remote
host to give you the thing you needed. Eventually, packagers were created to
distribute applications more easily.

Then we had web pages.

Web pages were supposed to enable us to browse remote documents. They worked,
for a time. But then people either forgot or were annoyed by making
applications.

Then we had web applications.

Entire systems of software development combined a web page with an
application. You couldn't use it offline, and it didn't browse documents so
much as allow you to use an application remotely. The browser would show you
an application with which you would browse documents. And it worked, for a
time. But then people apparently got tired of distributing apps over a web
page.

So now we have web packaging?

If you wanted a universal application platform, make a less shitty form of
Java or something. But stop pretending that hypertext is an application,
trying to make me jump through hoops to read some text. I don't need my
content proxied, prettified, modified, imaged, scripted, stylized, or
customized. I don't need it faster, or better, or more private, or more
_anything_. I really just want to read the text of the article I wanted to
read. Honestly.

I'm sick of new wheels. I'm sick of progress. I'm sick of advertisements,
scripts, pretty fonts, pop ups, pagination, and columns of useless
distraction. I'm sick of commentary by ignorant intolerant insensitive
paranoid outraged strangers. I'm sick of trying to read a news article and
being assaulted by the equivalent of five kinds of media warring for my
attention. I'm sick of likes. I'm sick of sharing. I'm sick of people who have
seemingly made it their purpose in life to annoy me. I'm sick of technology.

~~~
cromwellian
AMP isn't being used for applications, it's being used to deliver mostly
static text documents with images. It's pretty bare bones, but people didn't
like Google's implementation that works on unmodified browsers, and so now
there's a new proposed implementation that requires browsers to implement it
natively.

Most of the anti-AMP commentators keep repeating over and over again that
people can make documents which render as fast, but the Redfin article
essentially points out that this goes beyond stripping out all JS, and having
quick HTML parsing. You could reduce parse/layout to 0 and still be slower
than AMP.

Do you want to install a native application just to read each article? It
doesn't scale. Even simple things like DNS lookups on mobile networks can add
hundreds of milliseconds delay (from 80ms at the median to 500ms at the 90th
percentile), and the subjective delay causes people to feel the bad.

~~~
peterwwillis
It takes several seconds to load most web pages on modern browsers because
modern browsers have more code in them than my operating system, my browser
wants to load everything encrypted, and most web pages are designed to deliver
so much unnecessary crap in such an obnoxious way as to make it take
significantly longer _on purpose_ just to get to the content.

Google's response is "No worries, we'll just download it for you, screw it up,
and then present it to you." Thanks, Google. I didn't ask for that, but that
sure never stops you from encroaching ever more into my life.

Incidentally, all ISPs could provide simple proxies that cache and return
pages faster, but not with HTTPS. Google being our grand overlord and de facto
tech nanny state, they would rather provide this solution themselves than
allow ISPs to not do it perfectly (and at the same time siphon up any
potential metadata that a carrier could use to monetize traffic going over its
infrastructure)

Google didn't invent advertising-driven free services, but they sure as hell
perfected it. Most of the annoyances on the web are due to free services - not
latency. And mobile providers could prioritize latency over bandwidth, but
lower latency does not sell new mobile plans.

~~~
cromwellian
We're not talking about AMP vs bloated desktop web pages, we're talking about
AMP vs hand-optimized and stripped down simple documents.

Yes, ISPs could provide proxies, if you want your ISPs to be able to track
everything you do and then resell your behavior
([https://techcrunch.com/2017/03/28/house-vote-sj-34-isp-
regul...](https://techcrunch.com/2017/03/28/house-vote-sj-34-isp-regulations-
fcc/)) , or allow the NSA to snoop on your behavior. You act as if HTTPS was
introduced for nefarious reasons and not as a reaction to very real attacks on
confidentiality and integrity. The web isn't going to return to the world of
1994, or the idyllic pre-Morris Worm era when we just didn't care about
security.

You're sick that the world has gotten a lot more complicated and noisy. I am
too, it's part of growing old, get used to it.

~~~
peterwwillis
I'm talking about AMP vs the news articles and cooking recipes I try to read
that get intercepted by AMP.

Google already tracks everything I do and resells my behavior. That is
literally their entire business model.

The NSA puts backdoors in hardware modules you can't remove, finds flaws in
firmware, cracks crypto, and exploits mobile devices that can't or won't be
updated. And HTTPS simply isn't necessary for 90% of the use cases its
champions claim.

I've switched my default search engine, changed browsers, unloaded most of my
free hosted services to paid ones, and am paying for a newspaper subscription.
I am saving money in the process by cutting unnecessary expenditures to pay
for these things. I didn't have to get used to it and life is better.

~~~
cromwellian
Putting a backdoor in hardware modules is a way more expensive threat model
than the low hanging fruit of observing or modifying your network traffic. So
your argument is, since the most elaborate state level actor in the world can
bypass pretty much any protection you come up with if they focus on you, you
should therefore ignore all of the other threats out there?

And by getting used to it, I was referring to the complexity of the whole
technology stack, and the sheer amount of defense of depth that has been added
to it. You obviously didn't get used to it, because you're complaining about
it and ranting about "technology", social media, and many other things, in
your top level post.

But if you disconnected from all of this stuff and achieved a zen-like state
of nirvana, then "Likes" or proliferation of tech stacks that other people
like to create and use shouldn't bother you.

When someone lists a whole bunch of stuff they hate, but then state they've
gone cold turkey and freed themselves from it, but still go on an epic
unprovoked rant complaining, it sounds to me like someone saying "Get off my
lawn and stop playing rap music".

I despise selfies and hate people taking food pictures when I'm eating with
them, but it's pretty much the the world is now. That's what I meant by "get
used to it", there's no point ranting about it anymore.

~~~
peterwwillis
> But if you disconnected from all of this stuff and achieved a zen-like state
> of nirvana, then "Likes" or proliferation of tech stacks that other people
> like to create and use shouldn't bother you.

I didn't achieve zen. My life is better, but all the other shit still bothers
the hell out of me.

Complaining has a long and successful history. Our entire democratic process
is based on complaining. Complaining and throwing tea in a harbor. Just
because I threw my tea in the harbor doesn't mean the tea isn't still getting
taxed, or that my responsibility to speak out goes away. Granted, my form of
whining and moaning was more "kids on my lawn" than "taxation without
representation", but hopefully people can see the point is that this is all
unnecessarily burdensome.

------
prepend
How many years will it take until Google introduces “google keywords” instead
of DNS?

Mark my words, this non-open, non-standards stuff is a slippery slope. AOL has
good intentions as well, and only toward the end went full rent seeking.

Google can solve a lot of its problems by allowing companies to pay for and
register keywords so they can make a safe, vetted Internet that advertisers
will like without worrying about their brands showing up next to ISIS.

~~~
DennisAleynikov
this comment has nothing to do with the article. The author addresses that amp
sucks and talks about getting similar functionality without people getting mad
at google for being skynet. google isn't trying to replace dns or other core
web tech just trying to make delivery lubricated which gets them so much hate.
if a cdn introduced AMP it wouldn't be plagued by this phobia of over
centralizing.

~~~
prepend
Good point. I should have described more clearly to make the link that AMP is
Google unilaterally exerting more control over the web and making it less
open.

If a CDN introduced this, they wouldn’t have the massive market position that
Google does. So they’d have to either propose a standard and get adherents or
just add it to the pile of stuff that isn’t used. Google is different because
of their search dominance.

But I think this that Google is turning into more a controller who isn’t
concerned with open standards. The keywords thing was just an example of how
much AOL sucked when Google started up.

------
JepZ
Its the first time I read about Web Packages[1] but when you combine it with
service workers it could really make sense. Just imagine downloading an _.wpk
and install it to your local environment like a_.deb or *.apk package. I think
that could be a nice way to solve the omnipresent dependency on servers for
PWAs.

[https://github.com/WICG/webpackage](https://github.com/WICG/webpackage)

------
alpb
Funny, a similar post in the opposite direction from Airbnb is also in the
front page right now:
[https://news.ycombinator.com/item?id=16422763](https://news.ycombinator.com/item?id=16422763)

------
ravenstine
Or we can simply deliver what the user needs and not include every analytics
tracker under the sun, scrolljacking, or shove dozens of images and links in
their face to improve "engagement".

~~~
dfabulich
(Author here.) Clearly AMP should be replaced, but I argue in the article that
prerendering offers better performance even than bare HTML pages with no
JavaScript.

"Delivering what the user needs" means performance, too; prerendering simply
can't be beat.

The best solution will provide a way to prerender pages without AMP, without
iframes, and without violating users' privacy. I claim that Web Packaging is a
step in that direction, and even a further step toward re-decentralizing the
web.

~~~
kuschku
Prerendering isn't necessary here either.

Usually you can get the above the fold content rendered in 2x latency + 10ms.
That's around 3 to 5 frames.

Prerendering is only useful for sites where either large amounts of data need
to be transmitted, or parsing and rendering is slow.

If parsing and rendering is too slow for realtime usage, we need to fix that -
not try to circumvent it.

You can get a full JVM up, an entire major codebase parsed, JITedd, profiled,
optimized, JITed again, running, and finishing in 40ms.

Yet we're seeing several seconds to parse some JS + HTML + CSS?

That's the true bottleneck.

~~~
dfabulich
"2x latency" can be pretty slow on noisy cellular networks. Especially with
TCP exponential backoff, latency can be a second or more. That's where
prerendering really shines.

(There's a reason why AMP, "Accelerated Mobile Pages," rolled out on mobile
devices and not desktop.)

~~~
yorwba
Ironically, mobile users are also more likely to be on a plan with a low data
cap, so prerendering might not be in the user's best interest.

~~~
digi_owl
There is the Opera Mini way of pre-rendering though.

But that requires that you trust Opera to not do something naughty.

------
ficklepickle
I think the alleged performance improvements are only an illusion. The device
still has to use data and electricity, in fact more because it is fetching a
bunch of things you probably don't want.

Link prefetching is already a thing, so I don't see why we need another
standard to resolve this.

Also the privacy argument is moot, I believe. In the questionable example of
the AIDS patient, you are instead trusting Google with this info. That is not
any better to me.

I'm a front-end developer and I see so many sites bogged down with many
analytics and tracking providers, some multiple times. I can't help but feel
like AMP is an attempt to maintain the tracking and analytics status quo,
while giving the illusion of performance, instead of just chilling out on the
multiple redundant client-side analytics.

~~~
nbsd4lyfe
I have an awful ISP - having a local mirror is a massive improvement.

It almost seems like the web is unusable aside from companies large enough to
have a mirror here.

------
asymmetric
> There’s no way to work around this privacy problem while allowing your
> browser to visit 10 random sites.

Wrong. Browsers could intelligently delete cookies after a short time, which
is what Apple is doing with Intelligent Tracking Prevention[0].

More sophisticated users can install browser extensions that allow them to do
this manually[1].

[0]: [https://webkit.org/blog/7675/intelligent-tracking-
prevention...](https://webkit.org/blog/7675/intelligent-tracking-prevention/)

[1]: [https://addons.mozilla.org/en-US/firefox/addon/cookie-
autode...](https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/)

------
sbuk
Lost me at "AMP haters"...

