Characterizing the Performance Impact of AMP
blog.apnic.net
blog.apnic.net
Where is the performance improvement coming from?
The largest performance benefits comes from a drastic reduction in the number of various objects loaded in AMP
For the millionth time, you don't need AMP to improve your website performance. The reason there is "better performance" in the AMP vs non-AMP pages according to this article, is that there are fewer assets and objects to load in the AMP pages due to some of the restrictions AMP imposes.In other words, load fewer assets, write less code, and you'll have better performance.
AMP is still bad, and it does not itself make the web faster.
I honestly don't get all the hate AMP gets around here. From a consumer standpoint AMP provides nothing but benefits compared to what we had before.
Instead, AMP is about control and disintermediation – eliminating the need for users to ever actually visit the sites of content producers. The economic impacts of that redirection be damned.
The objection to AMP is thus not about the performance. It's about Google's proprietary end-run on the web platform, and its (ab)use of monopoly power to achieve that end.
You state this as a fact, but Google seems to use, and to have long used, load time as a ranking metric (see https://backlinko.com/google-ranking-factors #22, for example), and I've never heard any serious complaints about it.
Two main reasons:
1. The obfuscation of AMP source URLs in Google search results is usually the biggest reason for the hate.
2. The "AMP Carousel" in Google search results is designed to keep people on Google and makes it much less likely people will leave to explore other pages on the publisher site (I can't find the article now but I recall reading a report from one publisher that showed a HUGE dropoff in users viewing an article and then going to view other articles on the site).
So it's less about the technology of AMP per se and more that, the way it's currently implemented, is about Google dictating more and more the way the web works.
Just speaking from personal experience, lots of AMP pages are totally broken for me aside from the actual content. I have encountered pages multiple times where visiting links to other content was broken. I would (personally) take findings like this with a grain of salt.
You can see it for a number of sites already. For example, search for an AMP result from collins dictionary.
- It splits each webpage in two.
- Hiding the real domain means fake sites and phishing are possible
- Prerendering downloads on average 1.4 MB of data with every search results page that the user may not even want or ever choose to see (it might even become a huge secuyrity hole). This probably renders server-side analytics useless too. only google now knows the truth about your traffic
- single point of failure for a government to shut down / censor articles / delete specific information from all news websites
- obvious google's control of your content / and manipulatively ranking higher the content they render - I expect this to cause an anti-trust fine very soon
- Replacing HTML with an abomination , which WILL be abused in a few months, the same way that html is currently abused in news sites.
i m curious how they manage to preserve privacy if they route api requests through their servers
As reported in the paper, prerendering only affects amp pages in the first viewport of the search results, which is reported as 10% of the results in their sample. Prerendering does not have any security issues. AMP guarantees that all resources in preload are served by the AMP cache, and custom javascript is prevented by your browser via CSP.
Javascript based analytics works fine, with support for all major vendors and custom setups.
> Prerendering does not have any security issues.
Currently. Are you saying it is impossible that someone will hide a hack in an amp page that steals data or sth without the user ever visiting that amp page?
> AMP guarantees that all resources in preload are served by the AMP cache,
What about privacy? are user data sent through google's servers?
> Javascript based analytics works fine, with support for all major vendors and custom setups.
How do those analytics handle prerendering?
When using signed exchanges, the preload does not even parse the document until navigation, as per the signed exchange spec.
Analytics loading is deferred until after user navigation, which makes sense as the user has yet to navigate to the document.
The AMP Cache serves publicly cached HTML documents, and the static fonts/images within those documents. If a document wants to render user specific data, it can load that directly from the publisher's origin upon navigation (not routed via the AMP Cache). See, for example https://amp.dev/documentation/components/amp-list/. Analytics, ads, etc are all fetched directly from the vendor or publisher origin and the AMP Cache will neither proxy nor otherwise see this data.
Entering the URL directly will make an HTTPS request to the URL's origin server, as it always has. There will be no AMP Cache involved in that request, but it will work just the same.
And that's a feature that's just not possible to support for arbitrary HTML. Just because you've repeated something that's not true a million times does not magically make it true. Cross-origin prefetching is not viable (privacy leaks, flaky browser support). And on the flip-side, same-origin serving can't be done securely with arbitrary HTML + JS.
I get that this won't make you hate AMP any less. But maybe the hate could be rooted in facts? It'd make it a lot easier to have a rational discussion about the subject.
And prerendering is absolutely viable and in practice all over the place apart from AMP. Here's Chrome's own docs on it: https://www.chromium.org/developers/design-documents/prerend...
Is the AMP-specific prerendering another abuse of Google's position despite them using the technology elsewhere?
It just seems like this is not technology specific, but prioritization of tech created by a giant company that owns nearly everything and must own more.
I'm not an expert but Google AMP is not a simple CDN cache. The Google-owned servers also proxies API calls to whitelisted urls like approved ad networks and Google Analytics. (Expand all the triangles in the list: https://amp.dev/support/faq/platform-and-vendor-partners/)
A cache service like Cloudflare CDN doesn't do that. (Although there's an example of somebody trying Cloudflare's new "Workers" functionality to proxy an api call on the server side instead of the browser side: https://community.cloudflare.com/t/google-analytics-proxy-wo...)
For publishers that use ad networks, Google's AMP is a different value proposition from a typical CDN. Because Google's AMP has a different technical architecture, it solves a different problem than a CDN.
Yes, Cloudflare could conceivably add more functionality to their service to proxy ad network api calls like Google AMP but it wouldn't buy them as much of a speed boost because Cloudflare doesn't own/control the "google.com" domain that serves search results. It's "www.google.com" that has Google's trusted javascript code to preload AMP data that is executed on the user's web browser.
Yes, it's substantially different, since the purpose of Google's AMP cache is to serve pages linked to from a Google origin. Google has to know which search query you entered to render the results page, so prefetching some of the actual results doesn't leak any information. If you prefetch from arbitrary domains, you leak information about people making a search to those domains, even if they don't click through.
(And likewise for other entities that are running their own AMP caches, for links hosted on their own origins.)
That's very clearly the actual technical problem being solved; if you set out to solve the problem of privacy-preserving prefetching of search results with the tech from 5 years ago, you'll inevitably end up with something like AMP.
> Does that fact alone make it faster? If so, are we as a community okay with this imperialist strategy by Google?
Irrelevant, since you're basing both of these questions on inaccurate assumptions.
I mean the article itself says that the other improvement are much less significant than the overall 2.5 speedup of the amphtml page. Whether the user will have to do 1-2 more seconds is immaterial , when you have typical newspaper websites that take 10-30 seconds to load.And you don't implicate google's caches (which will at some point refuse to render you if your page is against their politics) in any step.
Regardless, i believe amp will fail equally to how html pages fail now: newspaper marketers will keep adding more and more stuff to their amphtml webpages (and amp makes it easier to add extra components), and no matter how fast it loads, they will become heavy as hell and your phone will again start to smoke. We just dont see that yet because it's early days - but newspaper sites were also bare html 20 years ago. AMP is an evil bandaid with significant sideeffects
Say what now? Citation needed.
i cant bring u a citation from the future. it's speculation
I think there's a pretty big difference between a few seconds and instant. Maybe you think the difference doesn't matter to the UX, and there's at least a discussion. But just going lalala and denying that the difference exists?
I'm confused by what the "AMP viewer" plot-lines represent then, but not including the actual pre-rendering is leaving off a huge source of improvements.