summaryrefslogtreecommitdiff
path: root/ars-technica/published/amp.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ars-technica/published/amp.txt')
-rw-r--r--ars-technica/published/amp.txt118
1 files changed, 118 insertions, 0 deletions
diff --git a/ars-technica/published/amp.txt b/ars-technica/published/amp.txt
new file mode 100644
index 0000000..efe2ea5
--- /dev/null
+++ b/ars-technica/published/amp.txt
@@ -0,0 +1,118 @@
+There's a story going around today that the Web is too slow, especially over mobile networks. It's a pretty good story—and it's a perpetual story. The Web, while certainly improved from the days of 14.4k modems, has never been as fast as we want it to be, which is to say that the Web has never been instantaneous.
+
+Curiously, though, rather than focusing on possible cures like increasing network speeds, finding ways to decrease network latency or even speeding up Web browsers, the latest version of the "Web is too slow" story pins the blame on the Web itself. And, perhaps more pointedly, on the people who make it.
+
+Certainly the story has some truth to it. The average Web page has increased in size at a terrific rate. In January 2012, the average page tracked by HTTPArchive <a href="http://httparchive.org/trends.php?s=All&amp;minlabel=Oct+1+2012&amp;maxlabel=Oct+1+2015#bytesTotal&amp;reqTotal">transferred 1,239kB and made 86 requests</a>. Fast forward to September 2015 and the average page loads 2,162kB of data and makes 103 requests. These numbers don't directly correlate to longer page load-and-render times, of course, especially if download speeds are increasing too, but they are one indicator of how quickly Web pages are bulking up.
+
+Native mobile applications, on the other hand, are getting faster. Mobile devices get more powerful with every release cycle, and native apps take better advantage of that power. Apps get faster, the Web gets slower. This, so the story goes, is why Facebook must invent Facebook Instant Articles, why Apple News must be built, and why Google must now create <a href="http://arstechnica.com/information-technology/2015/10/googles-new-amp-html-spec-wants-to-make-mobile-websites-load-instantly/">Accelerated Mobile Pages</a> (AMP). Google is late to the game, but AMP has the same goal as Facebook's and Apple's efforts—making the Web feel like a native application on mobile devices. (It's worth noting that all three solutions focus exclusively on mobile content.)
+
+For AMP, two things in particular stand in the way of a lean, mean browsing experience: JavaScript... and advertisements that use JavaScript. The AMP story is compelling. It has good guys (Google) and bad guys (everyone not using Google Ads), and it's true to most of our experiences. But the story also has some fundamental problems. For example, Google owns the largest ad server network on the Web. If ads are such a problem, why doesn't Google get to work speeding up the ads?
+
+More on that in bit. But first, AMP.
+<h2 id="what-is-amp">What is AMP?</h2>
+To understand AMP first you need to understand Facebook's Instant Articles. Instant Articles uses RSS and standard HTML tags to create an optimized, slightly stripped down version of an article. Facebook then allows for some extra rich-content like auto-playing video or audio clips. Despite this Facebook claims Instant Articles are up to 10 times faster than their siblings on the open web. Some of that speed gain comes from stripping things out, some likely comes from aggressive caching.
+
+But the key is that Instant Articles are only available via Facebook's mobile apps and only to established publishers who sign a deal with Facebook. That means reading articles from Facebook's Instant Article partners like National Geographic, BBC, Buzzfeed and others is a faster, richer multimedia experience than those same articles when they appear on the publisher's site.
+
+Apple News appears to work roughly the same way, taking RSS feeds from publishers and then optimizing the content for delivery within Apple's application.
+
+All this app-based content delivery cuts out the web. That's a problem for the web and by extension, Google, which leads us to Google's Accelerated Mobile Pages project.
+
+Oddly though, unlike Facebook Articles and Apple News, AMP eschews standards like RSS and HTML in favor of its own little modified subset of HTML. AMP HTML looks a lot like HTML without the bells and whistles. In fact, if you head over to the <a href="https://www.ampproject.org/how-it-works/">AMP project announcement</a> you'll see an AMP page rendered in your browser. It looks like any other page on the web.
+
+AMP markup uses a basic set of tags from HTML. An extremely limited set of tags. Form tags? Nope. Audio or video tags? Nope. Embed? Certainly not. Script tags? Nope. There's a very short list of the HTML tags in allowed in AMP documents available over on the <a href="https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md">project page</a>. There's also no JavaScript allowed. Those ads and tracking scripts will never be part of AMP documents (don't worry, Google will still be tracking you).
+
+AMP defines several of its own tags, things like `amp-youtube`, `amp-ad` or `amp-pixel`. The extra tags are part of what's known as <a href="http://www.w3.org/TR/components-intro/">web components</a>, which is not now, but likely will eventually be a web standard (or possibly ActiveX part 2, only the future knows for sure).
+
+So far AMP probably sounds like a pretty good idea to most readers. Faster pages, no tracking scripts, no JavaScript at all so no overlay ads about signing up for newsletters or downloading apps no one needs.
+
+But then there are some problematic design choices in AMP. The more you look at AMP the less it looks like a good idea.
+
+Let's start with some of the poor technical decisions in the current incarnation of AMP. Or at least they're poor decisions if you like the open web and the current HTML standards.
+
+AMP re-invents the wheel for images by using the custom component `amp-img` instead of HTML's `img` tag, and it does the same thing with `amp-audio` and `amp-video` rather than the HTML standard `audio` and `video`. AMP developers argue that this allows AMP to serve images only when required, which isn't possible with the HTML `img` tag. That, however, is a limitation of web browsers, not HTML itself. AMP has also very clearly treated <a href="https://en.wikipedia.org/wiki/Computer_accessibility">accessibility</a> as an after thought. You lose more than just a few HTML tags with AMP.
+
+In other words AMP is technically half baked at best. The good news is that AMP developers are listening. One of the worst things about AMP's initial code was the decision to disable pinch and zoom on articles. Thankfully Google has reversed course and <a href="https://github.com/ampproject/amphtml/issues/592">eliminated the tag that prevented pinch and zoom</a>.
+
+There are also dozens of other open issues calling out some of the <href="https://github.com/ampproject/amphtml/issues/517">most</a> <a href="https://github.com/ampproject/amphtml/issues/481">egregious</a> <a href="https://github.com/ampproject/amphtml/issues/545">decisions</a> in AMP's technical design. There are already open issues surrounding nearly every technical shortcoming mentioned in this article.
+
+But AMP's markup language is really just one part of the picture. After all, as pointed out above, if all AMP really wanted to do was strip out all the enhancements and just present the content of a page, there are existing ways to do that. Speeding things up for users is a nice side benefit, but the <em>point</em> of AMP, as with Facebook Articles, looks to be more about locking in users to a particular site/format/service. In this case, though, the "users" aren't you and I as readers; the "users" are the publishers putting content on the Web.
+
+<h2 id="its-the-ads-stupid">It's the ads, stupid</h2>
+
+The goal of Facebook Instant Articles is to keep you on Facebook. No need to explore the larger Web when it's all right there in Facebook, especially when it loads so much faster in the Facebook app than it does in a browser. (As Facebook <a href="https://instantarticles.fb.com">puts it</a>, "articles load instantly, as much as 10 times faster than the standard mobile Web."
+
+Google seems to have recognized what a threat Facebook Instant Articles could be to Google's ability to serve ads. This is why Google's project is called Accelerated <em>Mobile</em> Pages. Sorry, desktop users, Google already knows how to get ads to you.
+
+If you watch the <a href="https://googleblog.blogspot.com/2015/10/introducing-accelerated-mobile-pages.html">AMP demo</a>, which shows how AMP might work when it's integrated into search results next year, you'll notice that the viewer effectively never leaves Google. AMP pages are laid over the Google search page in much the same way that outside webpages are loaded in native applications on most mobile platforms. The experience from the user's point of view is just like the experience of using a mobile app.
+
+Google needs the web to be on par with the speeds in mobile apps. And to its credit the company has some of the smartest engineers around working on the problem. Google has made one of the fastest web browsers around (if not the fastest) and in doing so has pushed other vendors to speed up their browsers as well. Since Chrome debuted web browsers have become faster and better at an astonishing rate. Score one for Google.
+
+The company also been touting the benefits of mobile-friendly pages, first by labeling them as such in search results on mobile devices and then later by ranking mobile friendly pages above not-so-friendly ones when other factors are the same. It's also been quick to adopt speed improving new HTML standards like the responsive images effort, which was first supported by Chrome. Score another one or two for Google.
+
+But pages keep growing faster than network speeds, and the Web slows down. In other words, Google has tried just about everything within its considerable power as a search behemoth to get Web developers and publishers large and small to speed up their pages.
+
+It just isn't working.
+
+One increasingly popular reaction to slow Web pages has been the use of content blockers, typically in the form of browser add-ons that stop pages from loading anything but the primary content of the page. Content blockers have been around for over a decade now (No Script first appeared for Firefox in 2005), but their use has largely been limited to the desktop. That changed in Apple's iOS 9, which for the first time put simple content-blocking tools in the hands of millions of mobile users.
+
+Combine all the eyeballs that are using iOS with content blockers, reading Facebook Instant Articles, and using Apple News, and you suddenly have a whole lot of eyeballs that will never see any Google ads. That's a problem for Google, one that AMP is designed to fix.
+<h2 id="amp-static-pages-that-require-googles-javascript">Static pages that require Google's JavaScript</h2>
+The most basic thing you can do on the web is create a flat HTML file that sits on a server and contains some basic tags. This type of page will always be lightning fast. It's also insanely simple. This is literally all you need to do to put information on the web. There's no need for JavaScript, no need even for CSS.
+
+This is more or less the sort of page AMP wants you to create (AMP doesn't care if your pages are actually static or—more likely—generated from a database. The point is what's rendered is static). But then AMP wants to turn around and require that each page include a third-party script in order to load. AMP deliberately sets the opacity of the entire page to 0 until this script loads. Only then is the page revealed.
+
+This is a little odd; as developer Justin Avery <a href="https://responsivedesign.is/articles/whats-the-deal-with-accelerated-mobile-pages-amp">writes</a>, "Surely the document itself is going to be faster than loading a library to try and make it load faster."
+
+Pinboard.in creator Maciej Cegłowski did just that, putting together a demo page that duplicates the AMP-based AMP homepage, but without that JavaScript. Over a 3G connection Cegłowski's page fills the viewport in <a href="http://www.webpagetest.org/result/151016_RF_VNE/">1.9 seconds</a>. The AMP homepage <a href="http://www.webpagetest.org/result/151016_9J_VNN/">takes 9.2 seconds</a>.
+
+JavaScript slows down page load times, even when that JavaScript is part of Google's plan to speed up the web.
+
+Ironically, for something that is ostensibly trying to encourage better behavior from developers and publishers, this means that pages using progressive enhancement, keeping scripts to a minimum and aggressively caching content -- in other words sites following best practices and trying to do things right -- will potentially be slower in AMP.
+
+In the end, developers and publishers who have been following best practices for web development and don't rely on dozens of tracking networks and ads have little to gain from AMP.
+
+Unfortunately, the publishers building their sites like that right now are few and far between. Most publishers have much to gain from generating AMP pages -- at least in terms of speed. Google says that AMP can improve page speed index scores by between 15-85%. That huge range is likely a direct result of how many third-party scripts are being loaded on some sites.
+
+The dependency on JavaScript has another detrimental effect, AMP documents depend on JavaScript, which is to say that if their (albeit small) script fails to load for some reason -- say, you're going through a tunnel on a train, only have a flaky one bar connection at the beach -- the AMP page is completely blank. When an AMP page fails, it fails spectacularly.
+
+Google knows better than this. Even Gmail still offers a pure HTML-based fallback version of itself.
+
+<h2 id="amp-for-publishers">AMP for publishers</h2>
+Under the AMP bargain, all big media has to do is give up its ad networks. And interactive maps. And data visualizations. And comment systems.
+
+The deal isn't just for big media, either; your WordPress blog can get in on the stripped-down AMP action as well. Given that WordPress powers roughly 24 percent of all sites on the web, having an easy way to generate AMP documents from WordPress means a huge boost in adoption for AMP. It's certainly possible to build fast websites using WordPress, but it's also easy to do the opposite. WordPress plugins often have a dramatic (negative) impact on load times. It isn't uncommon to see a WordPress site loading not just one but several external JavaScript libraries because the user installed three plugins that each use a different library. AMP neatly solves that problem by stripping everything out.
+
+So why would publishers want to use AMP? Google, while its influence has dipped a tad across industries (as Facebook and Twitter continue to drive more traffic), remains a powerful driver of traffic. When Google promises more eyeballs on their stories, big media listens.
+
+AMP isn't trying to get rid of the Web as we know it; it just wants to create a parallel one. Under this system, publishers would not stop generating regular pages, but they would also start generating AMP files, usually (judging by the early adopter examples) by appending <code>/amp</code> to the end of the URL. The AMP page and the canonical page would reference each other through standard HTML tags. User agents could then pick and choose between them. That is, Google's Web crawler might grab the AMP page, but desktop Firefox might hit the AMP page and redirect to the canonical URL.
+
+On one hand what this amounts to is that, after years of telling the web to stop making m. mobile-specific websites, Google is telling the web to make `/amp`-specific mobile pages. Potato, potato.
+
+On the other hand this nudges publishers toward an idea that's big in the <a href="http://indiewebcamp.com/">IndieWeb movement</a>: Publish (on your) Own Site, Syndicate Elsewhere, or <a href="http://indiewebcamp.com/POSSE">POSSE</a> for short.
+
+The idea is own the canonical copy of your content on your own site, but then send that content everywhere you can. Or rather, everywhere you want to reach your readers. Facebook Instant Article? Sure, hook up the RSS feed. Apple News? Send the feed over there too. AMP? Sure, generate an AMP page. No need to stop there either, tap the new Medium API and half a dozen others as well.
+
+Reading is a fragmented experience. Some people will love reading on the web, some via RSS in their favorite reader, some in Facebook Instant Articles, some via AMP pages on Twitter, some via Lynx in their terminal running on a restored TRS-80. The beauty of the POSSE approach is that you can reach them all from a single, canonical source.
+
+&nbsp;
+<h2 id="amp-and-the-open-web">AMP and the open Web</h2>
+While has problems and just might be designed to lock publishers into a Google-controlled format, it does so far seem to be friendlier to the open Web than Facebook Instant Articles.
+
+In fact, if you want to be optimistic, you could look at AMP as the carrot that Google has been looking for in its effort to speed up the Web. As noted Web developer (and AMP optimist) Jeremy Keith <a href="https://adactio.com/journal/9646">writes</a> in a piece on AMP, "My hope is that the current will flow in both directions. As well as publishers creating AMP versions of their pages in order to appease Google, perhaps they will start to ask 'Why can't our regular pages be this fast?' By showing that there is life beyond big bloated invasive web pages, perhaps the AMP project will work as a demo of what the whole Web could be."
+
+Not everyone is that optimistic about AMP, though. Developer and Author Tim Kadlec <a href="http://timkadlec.com/2015/10/amp-and-incentives/">writes</a>, "[AMP] 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... Using a very specific tool to build a tailored version of my page in order to 'reach everyone' doesn't fit any definition of the 'open Web' that I've ever heard."
+
+There's one other important aspect to AMP that helps speed up their pages -- Google will cache your pages on its CDN for free.
+
+As the developer and creator of RSS, Dave Winer, <a href="http://scripting.com/2015/10/10/supportingStandardsWithoutAllThatNastyInterop.html">says in a post on AMP</a>, "AMP is caching... You can use their caching if you conform to certain rules. If you don't, you can use your own caching. I can't imagine there's a lot of difference unless Google weighs search results based on whether you use their code."
+
+And therein lies the biggest potential problem with AMP. If Google decides to abuse its position as the default search provider for the web and prioritize AMP pages above others then AMP becomes a threat to the open web.
+
+So far Google has said that AMP pages will not get any priority over regular pages in search results. But that could change. It's hard to imagine why that wouldn't change. Why would Google have faster pages at its disposal and not prioritize them over slower pages? After all speed is already a factor in rankings and AMP does make pages faster.
+
+Of course it's hard to tell what AMP will do in the long run. Google throws out new projects all the time, sometimes seemingly at random. Some, like GMail, redefine the world's experience of something previously taken for granted. Other projects go the way of Wave. Remember Google Author? That was the last time Google set out to "help" the publishing industry.
+
+For the web's sake let's hope Google sticks with AMP long enough to convince publishers that the real future is speeding up their own pages and embracing a POSSE-style approach. As Cegłowski writes on his AMP satire page, "it is 2015, and websites should be small and fast enough to render on mobile devices rapidly using minimal resources... Requiring a readable version of these sites is a great idea. Let's take it one step further and make it the only version."
+
+Let's just make sure that fast, readable version is one that lives at a URL on the open web.