Google wants to speed up the web, and it has a plan:
For many, reading on the mobile web is a slow, clunky and frustrating experience – but it doesn’t have to be that way. The Accelerated Mobile Pages (AMP) Project is an open source initiative that embodies the vision that publishers can create mobile optimized content once and have it load instantly everywhere.
Ramble Ramble Ramble
I’ve been wanting to dive into this topic all weekend. I started this post, I stopped this post, I came back to it, I let it lapse. In the end, others have already written thoughts about AMP HTML that are better than I could have rambled through on my own, so I am collecting some of them here (via links and some quotes).
Right off the bat, if you use the AMP project page to get a sense of how capable Google is of doing this right, you may become a little deflated. For starters, it fails on the accessibility front, lacking alt text on images, a lang attribute on the <html> element, controls on its opening video, and sufficient text contrast. It also seems to demonstrate just why we want faster pages by itself weighing in at 44MB over 124 requests, taking nearly 6 seconds to load as Mat Marquis demonstrated:
But that’s just the marketing page. That isn’t the AMP HTML spec itself (though maybe it’s trying to prove its own value?). Thankfully you can find it on GitHub and will see this very comforting opening (if you’re into standards-based development):
AMP HTML is a subset of HTML for authoring content pages such as news articles in a way that guarantees certain baseline performance characteristics.
Being a subset of HTML, it puts some restrictions on the full set of tags and functionality available through HTML but it does not require the development of new rendering engines: Existing user agents can render AMP HTML just like all other HTML.
Once you wade into the spec itself you will find that it does not, in fact, exist as a sub-set of HTML, but essentially a forked version. When you start minting new attributes that already exist in HTML, but for completely different purposes (in one case, placeholder), you have to agree with Jeremy Keith’s response:
Um. At some point, you may have to stop referring to AMP HTML as a subset of HTML and just say it’s a different language, because, well, if you invent attributes like this, it is.
If you read that entire bug thread, you might have a better sense of how there is little attempt here to truly exist as a sub-set of HTML.
For example, I feel that <amp-img> is an over-engineered replacement for <img>. While it allows srcset, I think leaning on the entire responsive image spec would be easier to track and promote consistent use. I also believe lazy-load feature could be explored using the <template> approach described by Christian Heilmann.
There are other places where the requirements fly in the face of good UX, such as this bit on defining the viewport for responsive layouts to prevent zooming (though there is a bug open to correct it [update below]):
AMP HTML documents MUST
contain a <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui"> tag inside their head tag.
There are other bugs tagged accessibility, and I hope to see more added to the list as there are a lot of curious decisions in the spec right now.
Even Longer (But Less Rambly) Reads
Tim Kadlec has a good post, AMP and Incentives, that I think sums up much of this rather nicely:
AMP isn’t encouraging better performance on the web; AMP is encouraging the use of their specific tool to build a version of a web page. It doesn’t feel like something helping the open web so much as it feels like something bringing a little bit of the walled garden mentality of native development onto the web.
Jeremy Keith has written a sort of FAQ in AMPed up that, in addition to being a great list of questions, has a great opener:
That error message (Sorry, this page is not valid AMP HTML.) is exactly the reason (well, one of many) that XHTML2 never went anywhere. Malformed HTML still gets rendered, malformed XHTML2 did not. That strictness prevented it from gaining any traction.
Update: November 17, 2016
Google’s AMP lies to us about news sources, owing to the Google.com URL:
Kyle Schreiber has a post, The Problem With AMP, that while not presenting anything brand new does remind us that in well over a year AMP has not quite gotten there. Granted, all standards processes take forever, but at least anyone can participate and they are mostly consistent when applied. His post does remind us that https://encrypted.google.com/ exists and is a viable search alternative if you want to still use Google.
Going on right now is the AMP Conf, which is being live streamed if you have the time to watch. I do not have the time to watch, but Tim Kadlic watched the AMP & the web platform talk and wrote some of his thoughts at AMP and the Web.
He notes that the panel, overall, claims that organizations are not choosing AMP for performance reasons, but for SEO reasons. Being an AMP page gives it a badge and a priority location in the carousel.
Sadly, this is corresponds to why I have found myself using Google as a search engine less and less. I want results for my query, not results based on which pages get promoted for following Google’s own technical requirements.
Update: March 13, 2017
Jeremy Keith attended the AMP conference:
This is one of the reasons why AMP feels like such a bait’n’switch to me. […] But the big difference, we were told, was that you get to host your own content. That appealed to me much more than having Facebook or Apple host the articles. But now it turns out that Google do host the articles.
Google’s AMP is bad – bad in a potentially web-destroying way. Google AMP is bad news for how the web is built, it’s bad news for publishers of credible online content, and it’s bad news for consumers of that content. Google AMP is only good for one party: Google. Google, and possibly, purveyors of fake news.
TechCrunch isn’t as overtly anti-AMP, but it does make an observation about Google’s I/O event:
[T]oday Google is introducing coding for three new ad formats. […] [I]t’s no surprise at all that [Google’s] efforts to improve the mobile user experience have moved into improving the mobile advertising user experience.
John Gruber reiterates his dislike of AMP:
It implements its own scrolling behavior on iOS, which feels unnatural, and even worse, it breaks the decade-old system-wide iOS behavior of being able to tap the status bar to scroll to the top of any scrollable view. AMP also completely breaks Safari’s ability to search for text on a page (via the “Find on Page” action in the sharing sheet).
Pixel Envy also gives us a perspective worth noting:
[W]e cannot ignore Google’s slow takeover of the web. The world wide web is slowly becoming a Google product, and that’s just as fundamentally flawed as if the web were a division of Comcast.
Ethan Marcotte points out two troubling developments (Stamp and a framework), and echos what I have been arguing all along — just use a set of guidelines that are based on standards.
What’s more, AMP’s scope is expanding. There’s talk of an upcoming AMP variant called “Stamp”, an extension of the framework that’d provide a Snapchat-like, media-friendly experience for publishers (and their advertisers). But I’m also given to understand Google’s about to position AMP as a general site-building framework, similar to Bootstrap or Foundation. […]
[…] But that aside, I can’t help but wish Google had approached their “Accelerated Mobile Pages Project” differently, perhaps as a set of guidelines. Rather than creating a parallel HTML standard, and leveraging Google’s own search results to incentivize adoption, I wish the AMP had defined a set of criteria that could’ve been validated by, say, Google’s own Lighthouse project.[…]
Jeremy Keith has called out Google’s constant mis-characterization of how AMP pages appear in search results:
At AMP Conf, the Google Search team were at pains to repeat over and over that AMP pages wouldn’t get any preferential treatment in search results …but they appear in a carousel above the search results. […] This is the only reason why The Guardian, for instance, even have AMP versions of their content—it’s not for the performance benefits (their non-AMP pages are faster); it’s for that prime real estate in the carousel.
This is, in my opinion, the only reason that AMP still has any legs with publishers. It certainly isn’t from guaranteed speed or control over hosting. It’s because Google has a lock on the search engine space and publishers have no choice but to play ball.
Ethan Marcotte tears apart the notion that AMP is open in anything but the most basic sense.
So, yes. The HTML standard does allow for the creation of custom elements, it’s true, and AMP’s license is quite liberal. But spend a bit of time with the rules that outline AMP’s governance. Significant features and changes require the approval of AMP’s Technical Lead and one Core Committer—and if you peruse the list of AMP’s Core Committers, that list seems exclusively staffed and led by Google employees.
Those who play in open source already know that putting something on GitHub and telling people that they contribute is usually an easy way of dismissing those who have valid concerns with a project. It immediately limits participation to only those who have the free time and the specific technical skills, which will never compete with the corporate team paid to know the technology and staff the project.
Do Google expect the W3C to update HTML5 by adding their additional elements and attributes?
Because then I don’t think Google understand the purpose of HTML. It is a general document format. It should not carry implementation-specific features such as “amp-boilerplate”, whose very name refers to Google’s project.
Do they think that the name “amp” belongs up there with “content” and “encoding”?
Or do they intend to keep the AMP format separate forever from HTML?