📜 ⬆️ ⬇️

I decided to disable google amp on my website



I’ve been linked to Google’s Accelerated Mobile Pages (AMP) project with a long history , but yesterday my patience overflowed.

I went to Twitter (in Safari on iPhone 6) and noticed that someone had referred to my site by putting an AMP link. I answered and indicated a real link, but when I clicked on it, I was redirected back to the AMP version of my page.


I copied the Twitter generated link and noticed that it looks like this:
')
https://t.co/6drRK5Cugz?amp=1

Notice amp=1 in the link. When you click on it, it returns the following HTML page:

 <head> <noscript> <meta http-equiv="refresh" content="0;URL=https://www.alexkras.com/simple-guide-to-finding-a-javascript-memory-leak-in-node-js/amp/" /> </noscript> <title>https://www.alexkras.com/simple-guide-to-finding-a-javascript-memory-leak-in-node-js/amp/</title> </head> <script> window.opener = null; location .replace(`https:\/\/www.alexkras.com\/ simple-guide-to-finding-a-javascript-memory-leak-in-node-js\ /amp\/`) </script> 

The sole purpose of this page is to redirect the reader to the AMP version.

My problems with AMP as a publisher


When the AMP project appeared, I was optimistic. His goal was to make the web faster, and I respect that goal.

What I really didn’t like as a publisher is that Google cached AMP content and gave it out of its own cache and under its own domain name. As a result, the links looked like this:

https://www.google.com/amp/www.bbc.co.uk/news/amp/39130072

In other words, instead of issuing content from BBC.co.uk, it came from Google.com.

There are several problems with this approach:

  1. It "lures" users to Google. If a person clicks on the “x” in the top screenshot, they will be sent back to Google search results. A normal redirect would send the user to a real BBC site, increasing the chances that he will remain on that site. Instead, AMP makes it easier for users to return to Google. This is the functionality that is always available in the browser by clicking the “Back” button. This is bad for publishers, but it’s probably inappropriate for the users themselves.
  2. It makes the system vulnerable to abuse. For example, fake news when publishing via AMP may seem authentic to an unprepared reader, since it comes from Google.com - a very reputable domain.

Oddly enough, this is NOT what Twitter does.

I think Twitter is based on the assumption that AMP content is better for users. For this reason, they are simply trying to provide users with the service and deliver the content in the best format.

My problems with AMP as a user


AMP consists of three components: HTML, a JavaScript library and a cache. In the previous section, I talked about my claims to the cache. The advantage of the cache, as the Google AMP developers told me , is that it allows Google (or any other platform) to preload content for the user. When a user clicks on the AMP link, Google can display the result almost instantly, since it has already been received in the background.

And again, oddly enough, Twitter does not use this caching layer. Twitter assumes that mobile users prefer to read content rendered in AMP format, even if it has not been preloaded into the cache.

For me, the problem is that I don’t like to read AMP content . There are a lot of small things that really annoy me in AMP.

For example:

Inconvenient scrolling


On iPhone, AMP reassigns default scrolling in the browser. As a result, scrolling on AMP pages seems to be absent.

Hard to share links


AMP makes it difficult to exchange links to original content.

Instead of just going to the address bar and copying the link, the user needs to press a special button to see the original URL. Then the user needs to click on the original URL, wait for the redirect and copy it from the address bar at the top.

Note: Whatever it is uncomfortable, but the button with the original link is a big step forward in the AMP interface. Initially, users had to manually remove the https://www.google.com/amp/ part from the address.

I’m ready to go through these difficulties because I don’t like to read AMP content and because I want to make sure that I trust the right source for this link . I am sure that most users do not produce all these steps. They simply copy the complete AMP link, like https://www.google.com/amp/www.bbc.co.uk/news/amp/39130072 , and share it. My wife, for example, constantly sends me such links. It’s really amazing to me that big publishers are not as concerned about this fact as I am.

AMP content is usually divided into parts.


Remember the times when we had to load WAP pages - special web pages that were created for mobile devices. Subscribing to AMP for a publisher is like a return to those times. Instead of using responsive design (when one version of the site works well on all devices), publishers have to maintain two versions of each page - the regular version for larger devices and mobile phones that do not use Google, and the AMP version.

The advantage of AMP technology is that it imposes severe restrictions on the content, thereby ensuring its fast loading. The problem with this approach is that not all content falls into AMP. For example, comments are often deleted.

I also noticed that loading images in AMP is buggy . AMP attempts to load an image only when it is within the scope of the user, and a white square is initially displayed. In my experience, it often happens that a white square is there instead of an image.

There are many other little nuances for different sites. For example, Reddit comments (a very important part of the site) are cached in AMP. As a result, new comments that are visible in the desktop version of Reddit are not displayed in the AMP version until the cache for this page is updated.

AMP is required for users


The publisher decides whether he wants to add AMP support for his site. But users do not have the ability to disable AMP .



It would be great if Google provided the user with settings with the ability to disable AMP rendering results . Unfortunately, even if they add such an option, it will not help much in conditions when Twitter or Facebook support AMP on the server.

Why I originally connected AMP for my site


I initially connected AMP to my site for one reason only - a good place for Google search results.

Shortly before the appearance of AMP, Google announced that it would omit to issue sites that are not displayed quickly enough on mobile devices. My website had a responsive design, but I was not sure that it was optimized enough for mobile devices. Therefore, when I found out about the presence of the AMP plugin for WordPress, I immediately connected it. And although Google has officially stated that AMP support does not affect the place in the search results, I decided that it would not hurt.

Another advantage of AMP for ranking in the search was that only sites with AMP support were displayed in the carousel function on Google. Although my site is unlikely to fall into the "carousel", but this opportunity should be important for large publishers.



It spreads


I thought about disabling AMP when I first found out that Google was loading my site from the cache , but changed my mind for two main reasons:

  1. I wanted to maintain a position in the search.
  2. I wanted to leave AMP as an option for those readers who need it.

What I didn’t understand before the Twitter story is that by activating AMP I allow other sites to choose how they want to refer to my content.

Less than two weeks ago, I wrote the following :

“I have no problems with the AMP library itself. I don't care that Facebook Instant Articles or Pinterest is using AMP. ”

How I was wrong. I thought that I didn’t care about it until I saw my Twitter link indicating the rendering in AMP format.

Users do not need it


A few weeks ago, someone on Twitter accused me of not liking AMP, because I have the “privilege” of fast Internet. Although I do have a fast internet connection, I don’t think I’d use AMP even on a slow connection. I would rather disable JavaScript in the browser (maybe even images, if everything is really so bad). This may not work for all sites, but my site is rendered and cached on the server side. Users only need to download some HTML to see any page. Why force them to download the AMP JavaScript library?

Of course, we have AMP, because Google wants users to see ads that are virtually absent when JavaScript is disabled . I also want users to see ads (advertisements Google, by the way), so I pay for server expenses. Nevertheless, I will gladly allow a person on a bad connection to abandon this part of the deal.

In any case, to test my theory, I opened the Chrome Developer Tools to strangle my connection to the slowest possible version, and turned off JavaScript. I opened the article on my website, and it loaded for three seconds . I tried to use Google search, and it turned out to be astonishingly fast, but there were no AMP links. Of course it was not, because they are shown only when JavaScript is enabled.

I turned on JavaScript again (keeping network speed low) and tried to search for some AMP content. It took more than 10 seconds to just download the carousel with the news.

As expected, static content (without javascript) is still at its best.

Please speak out


I first wrote about my concerns about AMP nine months ago. That article drew some attention to Hacker News, and the guys from the Google AMP department actively participated in the discussion on Hacker News and in the comments to my article . They even went so far as to invite me to dinner to learn more about my concerns.

Two weeks ago, I wrote a similar article entitled “ Please make Google AMP optional .” He received much more attention on Hacker News than the original article (entered the Top 300 posts in the history), but still did not affect the position of the Google AMP developers.

Perhaps the Google AMP staff realized that they would gain very little if they listened to a small part of the developer community who do not like AMP. They know that we are in the minority, and we are not their target audience. My mom and my wife don't go to Hacker News. They do not know what AMP is and are not particularly concerned about the problems of the open web.

At the same time, Google has many engineers for whom an open web is important. It really surprises me that I do not hear their statements against AMP. I can assume that this project received a blessing at the top, so it is politically dangerous to drive a wave.

However, those of us who do not like AMP must fight.

Do you have a WordPress site? Disable AMP or do not enable it if it is disabled.

Do you work for a publisher with AMP enabled? Try to explain to your employer the dangers of AMP, how he can lose traffic and brand awareness.

Are you just a web developer? Try to make faster sites and avoid overloading with scripts. There are many reference resources that can help you cope with this task (for example, see notes from the Chrome Dev Summit ). It will be easier to deal with AMP if most sites load quickly, even on weaker connections.

The decision to disable AMP did not come immediately. Fortunately, disconnecting it on WordPress was almost as easy as connecting. Simply deactivate the plugin. In less than 24 hours, Google stopped showing my site’s AMP version in its search results.

Supplement . Here I wrote down the specific steps I took, including installing a redirect for old AMP links: https://www.alexkras.com/how-to-disable-amp-on-wordpress/ .

Source: https://habr.com/ru/post/331958/


All Articles