Home > Web Front-end > HTML Tutorial > What is AMP? What is it used for?

What is AMP? What is it used for?

青灯夜游
Release: 2018-12-25 11:29:54
Original
22564 people have browsed it

What is AMP? What is it used for? This article will introduce AMP (Accelerated Mobile Pages) to everyone, so that everyone can understand what the core components of AMP are and what their advantages and disadvantages are. Let’s start with the specific content, I hope it will be helpful to everyone.

What is AMP? What is it used for?

What is AMP?

AMP (Accelerated Mobile Pages) is an open source framework developed by Google in partnership with Twitter that provides a straightforward way to create lightweight web pages that are instantly usable by users. , for a vastly improved experience: content is faster, more engaging, and easier to read.

Essentially, the AMP framework allows us to build lightweight experiences for mobile devices through simplified HTML and simplified CSS rules.

3 core components of AMP pages

AMP HTML:

A more streamlined than regular HTML The HTML version has strict specifications for the HTML tags that can be used. To ensure fast loading of pages, certain HTML elements are not allowed on AMP, such as forms; some default tags are replaced by AMP tags, for example, in AMP HTML code, the tag < amp-img > replaces < img > ;Perform image integration.

Note: AMP has restrictions on CSS, and only a simplified version of CSS can be used.

AMP JS:

To ensure fast page loading on mobile platforms, AMP restricts the use of any Javascript, with the only exception being AMP scripts. AMP’s own JavaScript library is responsible for loading all website elements, while all external resources are handled asynchronously, meaning the rendering process can occur without external influence.

AMP CDN: Often referred to as the AMP cache, a key component of the AMP platform is its proxy-based content delivery network (CDN) that delivers accelerated mobile pages.

Advantages and Disadvantages of AMP

Advantages:

1. Content loading speed is very fast , using a good mobile experience to improve engagement and conversion rates.

2. Through mobile search results, content can be highlighted in the AMP carousel.

3. Reduce the load on the server because AMP CDN caches and responds to most search results.

Disadvantages:

1. JavaScript has limitations and users cannot create it themselves, so it may be difficult to code.

2. Without integrated plug-ins, some effects are difficult to achieve on the page.

3. HTML is simplified, CSS is limited, and website styles cannot be customized well. Most of them are Google's default format.

Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.

The above is the detailed content of What is AMP? What is it used for?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template