Google added a new function to display & copy and share the original URL from AMP page
Google can access web pages on smartphones and tablets at four times faster than traditional "AMP(Accelerated Mobile Pages) ". Google search on mobile displays the AMP-compatible web page related to the search word, but the page displayed by AMP will be given a different URL than the original domain. There was a problem that this mechanism caused confusion of the reader and I could not copy the original URL that I was reading, but I explained about the addition of a new function to ameliorate AMP's URL problem on the Google Developers Blog It is.
Google Developers Blog: What's in an AMP URL?
A new function has been added to the AMP correspondence page from February 6, 2017, and an anchor button which can display, copy, and share the original URL is implemented in the header bar of the AMP page.
About the same content as the original page is displayed on the AMP compatible page, but because the URL is different, it is said that confusion such as "I do not know if it is really a usual website page" was occurring. Alex Fischer, a software engineer at the Google search department, explains the mechanism of AMP's URL because the question "Why a URL different from the original URL is generated" is one cause of confusion. According to Fischer, the content of AMP has three different URLs as follows.
◆ Three types of URLs generated on the AMP page
1: Original URL
The URL of the publisher's document written in AMP format.
2: AMP Cache URL
Google AMP CacheThe URL of the document delivered via, most users will not see this URL. (All Google AMP content is provided via AMP Cache)
3: Google AMP Viewer URL
The URL of the document displayed in the AMP viewer. (When rendered in Google search results)
In other words, it is a cause of confusion that multiple URLs are mixed in one piece of content, conversely speaking, content is displayed at a speed quadrupled, and the amount of data is about 1/10 The characteristic of AMP that it can be suppressed to that it is made by the mixture of multiple URLs.
◆ What is AMP Cache URL?
First, "Google AMP Cache" caches the acquired AMP HTML page and automatically improves the performance of the page, but in this behavior "AMP Cache URL" is generated. This is because the webmaster needs to be able to use the content at a specific URL, and Google AMP Cache can search Google's global scale (AMP Cache URL) via a new URL (AMP Cache URL) that mirrors and translates the original URL We can caching and deliver content through infrastructure. If you use Google AMP Cache with the original URL, the webmaster will need to change the DNS record or reconfigure the name server. For small websites, there may be no engineering resources to distribute content via these complex APIs, so anyone can easily benefit from AMP by converting the original URL to AMP Cache URL It seems to be able to do.
◆ What is AMP Viewer URL?
AMP Cache URL exists as a cached version of AMP content, but it does not touch the general user. On the other hand, if you tap an article displayed on the tile according to the search word on Google search, the URL starting with "google.com/amp" displayed in the URL bar of the browser, if you use AMP There may be familiarity. This "AMP Viewer URL" exists for pre-rendering.
◆ How pre-rendering works
◆ URL of "google.com/amp"
All of the above behavior is done on Google search results page. Tap on the AMP page does not move to another page, it just reads the iframe on the same page, so the browser does not need to change the URL. On the other hand, the screen shows the page (AMP viewer) of the website displayed from Google search, but when the user reloads the page, the reverse page of Google search will be displayed. To avoid this, the AMP viewer is manually updating the URL bar of the browser using "History API" which can process asynchronously without loading it.
It is ideal if the History API can update "original page" or "AMP Cache URL", but because there is a limitation that the History API can only read pages originating from the same domain, "Aww" www.google. Com "as the starting point, so that" AMP Viewer URL "is necessary there as well.
◆ AMP header bar
Although AMP requires multiple URLs, mixing of non-original URLs increases the possibility of receiving a phishing attack. For example, if a login page similar to Google appears in the AMP page, since it is difficult to see the URL bar, it may be possible to enter Google's login information on a fake site. To prevent this, the AMP Viewer A header bar indicating the source of the content that the user is viewing is displayed.
◆ How to use new functions
The new function added this time can display, copy and share the URL of the original page from the header bar. Actually, since the anchor button has been added to the header bar displayed when opening the AMP page, when you tap it, the original URL will be displayed. When you tap long tap, browser options such as "Open in new tab", "Open in new secret tab", "Copy link URL" are displayed. The new function has already been implemented in iOS version of the Google application, and it will be implemented in Android within a few weeks. From now on, by implementing the "Web Share API", we plan to be able to call the URL of the original page from the AMP viewer with the browser's own sharing function etc.