Labs
Mercury AMP Converter: Faster, Better (And Still Free)
Some updates to the Mercury AMP Converter.
One year ago this month, Google launched Accelerated Mobile Pages (AMP) in search results, the new format that loads web pages “instantly” when you tap on links to them on your mobile device. Today, when you do popular Google searches on your mobile device, AMP pages show up in the horizontal-swipe “carousel” atop search results, as well as in the regular list of blue links (denoted by the AMP lightning bolt icon).
Once Google started displaying AMP pages so prominently in mobile search results, here at Postlight we saw our publishing clients scrambling to implement the new format on their sites.
So we built a tool to make that easy: the Mercury AMP Converter. The Mercury AMP Converter publishes your web pages in the AMP format with a single line of code. (Sign up now — it’s free!) Once you do, your pages will load faster on mobile and could appear at the top of search results in the AMP carousel.
One year later, the Mercury AMP Converter and AMP itself have both seen major upgrades.
Faster: Rewritten from the Ground Up
Right now, the Mercury AMP Converter generates AMP for over a thousand global brands and publishers, serving hundreds of thousands of AMP pages for their sites. As usage increased, we saw several opportunities to optimize and scale the app.
We’ve spent the last couple of months completely re-architecting and rewriting the Mercury AMP Converter to increase speed, decrease errors, and reduce server costs.
- Leveraging the Mercury Parser API: Once Postlight launched the Mercury Parser API this past fall, we were essentially maintaining two web parsers: an aging, neglected module bundled inside the Mercury AMP Converter, and the new software powering the Parser API. It was time to work from a single codebase. The latest version of the AMP Converter replaced the error-prone, old parser with calls to the new API, which is under active development. Now, all the updates and fixes that improve the Parser API also benefit the AMP Converter, which means server errors are way down, and improvements are more frequent.
- From monolithic to decoupled: The first version of the AMP Converter was a monolithic, standalone Python application. In the process of decoupling the AMP transformation from the parsing, Postlight’s Zachary Golba opted to start from scratch and rewrite the AMP Converter in JavaScript, to make the stack less complex and easier to maintain. The Mercury AMP Converter is now a slimmed-down, decoupled client that focuses on doing one thing well: presenting web page content in the AMP format.
- Serverless API: The Mercury Parser API runs on AWS Lambda, which doesn’t involve provisioning servers that sit around idle during off-peak hours; Lambda only charges you for the function calls your application makes. Lambda’s approach is a great fit for the Mercury Parser API because it handles burst requests (e.g. when Google’s AMP cacher re-crawls sites) without costing extra during off-peak times.
The Mercury AMP Converter isn’t the only thing speeding up and getting better: how Google presents AMP pages is also improving.
Better: Support for Origin URLs
One of the few complaints we heard from publishers using the Mercury AMP Converter was how it displays the source of the AMP page as “mercury.postlight.com” instead of the origin URL. That issue appears to be getting resolved in the near future.
Google runs a developer testing sandbox for new AMP features (particularly around caching) at g.co/ampdemo/cache. A key update there resolves the canonical URL problem: on sites using Mercury, you will see the the site’s origin URL at the top of the AMP page (instead of mercury.postlight.com).
Google says this update to how AMP is displayed (and cached) will launch this quarter.
To AMPlify or Not
AMP isn’t perfect or complete, and some publishers want more features before they implement it, like a better UX for image galleries, or expanded support for advertising. Still, in less than a year, AMP represents 10 to 15 percent of search traffic for big publishers (as per an independent SEO consultant). Google’s own AMP case studies paint an even more optimistic picture.
The biggest argument against Google’s AMP implementation is that it displays content as if it lives on a google.com URL instead of the publication’s own domain. Google says this approach is what makes instant loading possible; others call it content lock-in.
This content distribution-versus-control debate is as old as the internet giants who prompted it, and they’re the same arguments you’ll hear around Facebook Instant Articles and even writing on Medium. But if you’re optimizing for distribution, AMP will help.
If you haven’t implemented AMP on your site yet, give the Mercury AMP Converter a try — and let us know what you think.
Thanks to Zachary Golba, Adam Pash, Toy Vano, and Matt Quintanilla for all their work on the Mercury AMP Converter and Parser API.
Story published on Feb 1, 2017.