AMP technology introduction
AMP (Accelerated Mobile Pages) is a Google technology which allows mobile devices to load web pages in a blink of an eye. It is intended for the whole English-speaking segment of the Internet. You can easily integrate it into your project, provided that you know some of its peculiarities.
- The technology based on a familiar HTML code. Some of the tags are replaced with AMP equivalents and some are restricted.
- JS uses the proprietary Google AMP js-library. Its functionality is not very versatile. There are just basic elements (mobile ‘burger’ menu, carousel, advertisements, analytics), so expect no beautifications or extreme functionality.
- Cache. Google indexes AMP page and caches it on its servers. When addressed, it gives customer the content from its server, not from your page. That’s all the magic!
It’s pretty logical, as all the effort is devoted to ‘slimming’ the page and making it load at the maximum speed. It’s done to satisfy mobile users, which are growing in numbers from year to year.
In this article, I would like to share my experience of creating AMP pages. What you see here is a fully implemented project. ‘Article list’ and ‘article’ pages were created using AMP technology, so if you read this article from your phone, you see the AMP version of a page.
AMP up and running
First of all, let’s create a new page. It will include a copy of content from the existing page.
Add an AMP attribute to the <html> tag, so it looks like this: <html amp>
Next, let’s turn our attention to the <head> section.
Add a link to the regular version of the page to the <head> section of the page: <link rel="canonical" href="urlDefaultPage"/>.
And vice versa, add a link to the AMP version to the regular page: <link rel="amphtml" href="urlAmpPage"/>
Schema.org
Later you should add a microdata section for search engines.
Micro formatting includes data for search robots to process. This allows to increase relevance for both search engines and users.
First off, microformat or microdata can be found in a snippet (description), which appears next to the site link in search results. A snippet contains a detailed page description, main page sections, a price span of goods, photos, addresses, phone numbers etc.
If you want to know how it’s done, follow this link: https://schema.org/
The result will look like this: