
WordPress Sites Now Support Google’s AMP to Make Mobile Pages Load Faster - jessecred
http://techcrunch.com/2016/02/24/wordpress-sites-now-support-googles-amp-to-make-mobile-pages-load-much-faster
======
atdt
As I've noted elsewhere: to use AMP, you _must_ load JavaScript from the AMP
CDN, which is operated by Google. So you are handing over the security of your
site and your user's privacy to them. From
<[https://github.com/ampproject/amphtml/blob/master/spec/amp-h...](https://github.com/ampproject/amphtml/blob/master/spec/amp-h...):
> The AMP runtime is loaded via the mandatory <script
src="[https://cdn.ampproject.org/v0.js"></script>](https://cdn.ampproject.org/v0.js"></script>)
tag in the AMP document <head>.

~~~
Zikes
AMP is just a subset existing web technologies. It's entirely possible to
build a page that loads just as fast or faster, without loading the AMP
scripts, if you so choose. But AMP greatly simplifies the process, which is
what developers need, and the script enforces the limitations necessary to
make the page load and render quickly, which users love.

Right now AMP is under heavy development and lots of changes are being made
very quickly. That mandatory script loads other resources from the same domain
on an as-needed basis, which is a crucial aspect of how AMP is designed to
work. I don't know if the v1 release will include a distribution package for
self-hosting, but it's not too much of a stretch to believe they've decided to
go with a central CDN just to simplify development for the early stages of the
project.

At any rate, this is no worse in principle than the Google Analytics scripts
everybody includes on every page everywhere, so it's mostly just a bunch of
FUD.

~~~
callahad
AMP erects walls around the Open Web and enshrines Google as the gatekeeper.

Want to embed content from another site? Great! You can choose from <amp-
twitter>, <amp-facebook>, <amp-instagram>, <amp-pinterest>, or <amp-youtube>.

Building an advertising startup? Hooray! I hope you're one of the dozen
whitelisted ad networks that <amp-ad> allows.

In Russia or China? Maybe Google will deign to implement <amp-vk> and <amp-
sinaweibo> if we're sufficiently humble.

This is not the Web I want.

~~~
Zikes
The project is open source and open to contributions from anyone. Every single
time this comes up the project contributors have said that they will gladly
modify <amp-ad> to support any network they can. They're also constantly
developing new <amp-X> components to fill in the gaps for other embeddable
services. You want <amp-vk>? Submit a PR! Open an issue! It's open source!

And please, _please_ tell me what's wrong with using e.g. <amp-youtube>? It's
just a web component! All it does is what you want it to do, and if it _doesn
't_ do what you want then either you _shouldn 't_ do that, or you can just
submit a PR.

The whole point of AMP is 1) make sure the developer doesn't do anything
that'll make the page load unnecessarily slowly or repaint/relayout
unnecessarily and 2) make it way easier for the developer to accomplish #1
because all you have to do is type <amp-youtube>.

AMP is no different from, say, jQuery, or React, or Angular. It's a different
way of doing things, but it's not a "gatekeeper" on the web. It's just another
option, one more tool in your belt, if you so choose.

~~~
callahad
> _The project is open source and open to contributions from anyone._

The project is exclusively governed by three Google employees, listed at
[https://github.com/ampproject/amphtml/blob/master/GOVERNANCE...](https://github.com/ampproject/amphtml/blob/master/GOVERNANCE.md),
all contributions are at their discretion.

All contributors must sign a legally binding licensing agreement with Google
which includes a patent grant, per
[https://github.com/ampproject/amphtml/blob/master/CONTRIBUTI...](https://github.com/ampproject/amphtml/blob/master/CONTRIBUTING.md).

The Web is powerful because you don't have to ask permission. AMP is not cut
from that cloth.

~~~
Zikes
I don't see what makes it different from any other open source project. Of
course it's going to have technical leads and core committers, it's not like
you can go force a PR merge on jQuery trunk any time you please. I'm aghast
that you would even suggest such a thing.

And CLA's aren't fun, but they're hardly new, either.[1]

If you don't like that it's Google, that's fine, but at least be honest with
yourself about it. But unless you've submitted a PR or can cite a PR (on any
Google OSS repo at all) that they've rejected purely on the basis that Google
is somehow doing wrong by the developers, then what are we even talking about?

[1]
[https://en.wikipedia.org/wiki/Contributor_License_Agreement#...](https://en.wikipedia.org/wiki/Contributor_License_Agreement#Users)

~~~
ajsalminen
To me the problematic part that makes it different to at least some open
source projects is that all those technical leads and core committers are
apparently employed by Google (and working on company time, I assume). That
could mean Google, and Google alone, gets to decide where it goes.

~~~
Zikes
Honestly, the only criticism I'm hearing over and over is "because Google",
and considering their track record with Chrome, Android, Angular, Polymer, Go,
and literally hundreds of other open-source projects, I'm perfectly okay with
that.

------
ronjouch
Benchmark time! For the example article mentioned in the article [1],

\- Default page: 74 requests, 1983kB, 2.98 in Firefox

\- Adding amp/ at the end: 14 requests, 464kB, 0.51s in Firefox

Good! And sad it's not the default :-/

EDIT: after proper reading of the consequences, of course it's not the
default. Indulgent readers will correct the above sentence as _" hope we're
moving to this kind of performance by default."_

[1] [http://blog.longreads.com/2016/02/18/the-freelancers-
roundta...](http://blog.longreads.com/2016/02/18/the-freelancers-roundtable/)

------
danso
I'm assuming this TC article thinks its audience is WordPress content-creators
and not just media companies? Here's its first acknowledgement of tradeoffs
(or rather, that the tradeoffs are no big deal)

> _And you don’t lose much as AMP markup supports a wide range of features.
> For instance, AMP has worked with ad networks, such as Outbrain, AOL, OpenX,
> DoubleClick and AdSense, to create optimized tags for mobile pages. So you
> can still put ad tags in your AMP-enabled pages. Similarly, you can add
> analytics tools. But these JavaScript calls will be optimized._

I've never been in the work of dealing with ads though now that I think about
it, that probably is one of the key things that the average, devoted content-
creator would care about.

But I do think this is a bit underplayed:

> _As for all the things that usually slow down web pages today, such as
> embeds, JavaScript-heavy content or Flash, WordPress strips out this content
> from the AMP pages. Comments are also omitted by default._

So...YouTube videos and things like embeddable Google Maps are not allowed? I
was assuming "no"...because that is Google's bottom line...(also, they're
whitelisted in the spec's extensions [1]). And I know the anti-comments-
section sentiment is strong in the media industry, but kind of weird to see
"oh yeah, no comments" as an afterthought. I'm assuming that means no
_WordPress_ comments (which come built-in with a standard WP install)...but
what about Disqus and Facebook? There are more than a few media companies in
which comment sections are more than trivially important.

[1]
[https://github.com/ampproject/amphtml/blob/master/extensions...](https://github.com/ampproject/amphtml/blob/master/extensions/README.md)

------
troyvit
I'm curious what long term ad click rates are going to be for publishers that
use AMP. The user experience is very reader-centric. When you do a search and
click on an AMP-enabled page (at the top of the search results) you can then
swipe left and scroll to the next AMP-enabled page. It's a strong incentive to
just read the headline of an article then swipe away. This is great for
readers but bad for publishers since they'll get fewer clicks and less time
spent on the site from users who come from google. For those of us who just
skim the headlines we'll never even see an ad.

google search will funnel users to amp-enabled pages, so anybody /not/ on the
amp train will suffer. In that way it is a walled garden. It's google's
version of becoming a portal.

How does google make money off of this?

~~~
wanda
> How does Google profit from this?

Isn't AMP intended to compete with the likes of Facebook Instant Pages?

At the same time, Google thrives by returning high quality search results. It
also depends heavily on web over native. For the web to stay relevant on
mobile, it needs to meet some minimum expectations met by native experiences.

I frequently find fault with the websites I arrive at through Google because
of shitty performance and irritatingly obtrusive advertising. There's more to
mobile friendliness than a responsive CSS grid system and publishers need to
realise that.

------
Animats
This is all about ads. "A goal of the Accelerated Mobile Pages Project is to
ensure effective ad monetization on the mobile web while embracing a user-
centric approach." It's mostly about optimizing some very inefficient ad
delivery systems. If you're just displaying text without ads, you don't need
AMP.

~~~
greglindahl
That's only one benefit of AMP. Another is ensuring that all of the excessive
and crappy Javascript that many sites run isn't used -- we expect to be able
to do a consistent and better job archiving AMP in the Wayback Machine than
arbitrary pages with arbitrary javascript.

~~~
mtberatwork
> Another is ensuring that all of the excessive and crappy Javascript that
> many sites run isn't used

While I wouldn't argue that there isn't a massive amount of god-awful
javascript being written today, but why does a third party, private company
get to determine what is or isn't "excessive and crappy" on someone's own
website? This sounds like a slippery slope to me.

------
colinramsay
I've got Ublock Origin and funnily enough, the LongReads example AMP page
loads only marginally faster than the "full" one. I don't understand why
people can't just remove all of the crap from their main pages rather than
relying on this Google-sponsored equivalent?

~~~
kmfrk
This way, they probably improve their (load-based) SEO without changing the
non-AMP site.

------
donohoe
No, your WP site supports AMP if you haven't bothered to do anything custom
and don't care about anything other than standard design.... in which case you
have work ahead of you.

~~~
pmaiorana
Definitely—but far less work than starting from scratch. The goal was not to
make it 100% plug-and-play for everyone, because that would be...impossible.
:)

------
pgrote
How To Get Started With Accelerated Mobile Pages (AMP)

[http://searchengineland.com/get-started-accelerated-
mobile-p...](http://searchengineland.com/get-started-accelerated-mobile-pages-
amp-240688)

"More than likely, simply installing the WordPress plugin will not be enough,
and you will have to go through and validate all of the pages you’d like to
benefit from Accelerated Mobile Pages.

Depending on how your articles are formatted, you may need to make some
changes in order to get the AMP pages to validate. The most common problems I
personally experienced were with specifying height and width attributes for
images and correcting old YouTube embed codes that weren’t using https."

------
michaelcheng
The official WordPress AMP plugin doesn't currently offer much. It seems to be
a simple install-and-go plugin with very little configurations.

There are some developers working on a few other plugins. I found this
PageFrog plugin
[https://wordpress.org/plugins/pagefrog/](https://wordpress.org/plugins/pagefrog/)
which AMPs your page but includes a bunch of other stuff.

Particularly PageFrog comes bundled with Facebook Instant Articles support
along with configurations for ads and analytics, which seems to be missing
from the official WP plugin.

------
ck2
WordPress is schizophrenic

Oh hey let's load up your webpages with all this cr*p by default, tons of
javascript, css, external files, fonts, headers, footers useless markup.

Oh hey, let's use this plugin to strip all that out.

How about not putting it in there in the first place.

~~~
krapp
I would say in that case, the administrator who didn't properly configure
their theme and plugins is "schizophrenic."

~~~
currysausage
Most administrators are lazy. If you write software for thousands or millions
of users, sane defaults are a must. I find it useful to keep Saint-Exupéry in
mind: _" It seems that perfection is attained not when there is nothing more
to add, but when there is nothing more to remove."_

Let's look at the first lines of WordPress's default template:

    
    
      <!DOCTYPE html>
      <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
      <head profile="http://gmpg.org/xfn/11">
    

Why bother with _xmlns_ if it's not well-formed XML anyway?

Why _dir_ and _lang_ if you don't really know what language the content is in?
We now have the funny situation that most non-English pages wrongly declare
_lang= "en-US"_ because W3C evangelists told template authors that _lang_ is
really important, rendering the attribute completely useless.

What the _heck_ is _profile=
"[http://gmpg.org/xfn/11"](http://gmpg.org/xfn/11") _ supposed to do?

~~~
nissehulth
What "default template" would that be?

As for the "lang" attribute, it is set to the language chosen when WordPress
was installed.

~~~
currysausage
Oops, sorry, I was looking at the HTML of the theme previewer instead of the
theme itself. With regard to WordPress, only my "XHTML friends network" point
remains valid. Concerning web development in general, I have seen way too much
cargo cult boilerplate, too many hardcoded _lang_ attributes, etc.

~~~
nissehulth
Yeah, the value of "XFN" is debatable. But it's usually written as a link
element that doesn't really break anything.

------
fareesh
Are AMP and HTTP/2 best practices contradictory to one another?

~~~
Zikes
Can you elaborate? From what I can tell, AMP makes use of on-demand resource
loading, which HTTP/2 prefers over bundled resources thanks to multiplexing.

~~~
fareesh
From what I understood, there are a few contradictions like splitting up
assets (preferable in HTTP/2) as opposed to concatenating/merging them
(preferable in AMP). Perhaps I misunderstood

~~~
Zikes
AMP encourages you to keep your assets separated, so you only load the bits
you need. If a page is going to use <amp-youtube> you'll have to include the
appropriate script tag for that component in the page, for example.

------
dang
There are two articles about AMP on the front page right now, this one and
[https://news.ycombinator.com/item?id=11167478](https://news.ycombinator.com/item?id=11167478).
Which is better?

~~~
cbhl
I actually found both useful. Both target different audiences and provide
different perspective on the issue. I probably wouldn't click through to
11167428 if I didn't use WordPress; whereas I wouldn't click through to
11167478 if I had already seen the AMP announcement last year ("I know about
AMP; when will there be stuff I can download/install/play with?").

~~~
dang
Ok, we'll leave them both up.

