{"id":339970,"date":"2022-10-19T15:00:38","date_gmt":"2022-10-19T15:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=339970"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=339970","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c AMP \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u0441\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 1\u0421-\u0411\u0438\u0442\u0440\u0438\u043a\u0441<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c AMP \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u0441\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 1\u0421-\u0411\u0438\u0442\u0440\u0438\u043a\u0441 \u0438 \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong> AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e<\/strong> \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0445\u043e\u0442\u044c \u0438 \u0432 \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0412 AMP \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u0430\u043a <strong>\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/strong>, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u0437 \u0438\u043d\u0444\u043e\u0431\u043b\u043e\u043a\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u043d\u043e\u0432\u043e\u0441\u0442\u0438), \u0442\u0430\u043a \u0438 <strong>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/strong> \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b<\/h3>\n<h4>1. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0441\u0438\u043d\u0433<\/h4>\n<p>\u0415\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 AMP, \u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c\u0438 \u043f\u043e \u0432\u0438\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0431\u0437\u0430\u0446\u0435\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0441\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0435\u0441\u043b\u0438 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043f\u043e\u0434 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e Google, \u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e.<\/p>\n<h4>2. \u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044e AMP, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043e \u043d\u0438\u0445 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043b\u0438\u0437\u0430, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438.<\/p>\n<h4>1. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 URL \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \/amp\/.<\/h4>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e URL \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 AMP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: domain.com\/about\/ \u0438 domain.com\/amp\/about\/, \u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u0438 \u043e\u0431\u0430 URL \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0430\u043f\u043a\u0443 &#8212; \/about\/.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite \u0432 .htaccess, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a URL \u0441 \/amp\/ \u0434\u0435\u043b\u0430\u044e rewrite \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u0431\u0435\u0437 AMP \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e HTML_TYPE=AMP , \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 init.php.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 .htaccess \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 AMP<\/p>\n<pre><code>&lt;IfModule mod_rewrite.c>     RewriteEngine On          # Google AMP          # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f URL \u0432\u0438\u0434\u0430 \/amp\/about\/delivery.php     RewriteRule ^amp\/(.+)\/(.+)\\.(php|html)$ $1\/$2.$3?HTML_TYPE=AMP [L,QSA]      # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f URL \u0432\u0438\u0434\u0430 \/amp\/about\/     RewriteRule ^amp\/(.+)\/?$ $1\/index.php?HTML_TYPE=AMP [L,QSA]      # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439     RewriteRule ^amp\/?$ index.php?HTML_TYPE=AMP [L,QSA] &lt;\/IfModule><\/code><\/pre>\n<h4>2. \u041d\u0430\u0443\u0447\u0438\u043b \u0431\u0438\u0442\u0440\u0438\u043a\u0441 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c<\/h4>\n<p>\u0414\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0432\u0435\u0441\u044c CSS \u0441\u0434\u0435\u043b\u0430\u0442\u044c inline \u0432 &lt;head><\/p>\n<\/li>\n<li>\n<p>\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0435\u0441\u044c Javascript<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 init.php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445: HTML_TYPE \u0438 URL_PREFIX.<\/p>\n<pre><code class=\"php\">&lt;?php \/\/ \u0415\u0441\u043b\u0438 \u0432 URL \u0435\u0441\u0442\u044c AMP, \u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445  if ($_REQUEST[\"HTML_TYPE\"] == \u201cAMP\u201d) {   define(\"HTML_TYPE\",$_REQUEST[\"HTML_TYPE\"]);   define(\"URL_PREFIX\",\"\/amp\"); }  if (!defined(\"HTML_TYPE\")) {   define(\"HTML_TYPE\",\"\");   define(\"URL_PREFIX\",\"\"); } ?><\/code><\/pre>\n<p><strong>\u041f\u0435\u0440\u0435\u043d\u0451\u0441 CSS \u0432 inline<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 CSS \u0432 inline \u0434\u0435\u043b\u0430\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e AMP_CSS \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 OnEpilog, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEpilog\",\"AMP_CSS\");  function AMP_CSS() { global $APPLICATION;  if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") { \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0432\u0441\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430 CSS, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043d\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e GetCSS;  $CSS_FILE = $APPLICATION->GetCSS();  if (!empty($CSS_FILE)) { \/\/ \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u044e \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 href \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 preg_match_all('\/href=\"(.+?)\\?.+?\"\/isu',$CSS_FILE,$CSS_FILE_MATCHES);  if (sizeof($CSS_FILE_MATCHES[1]) > 0) { foreach($CSS_FILE_MATCHES[1] as $CSS_FILE_MATCHES_VAL) { $CSS .= file_get_contents($_SERVER['DOCUMENT_ROOT'].$CSS_FILE_MATCHES_VAL); } }  if (!empty($CSS)) { $CSS_TMP = str_replace(array('!important'),'',$CSS);  if (!empty($CSS_TMP)) { $CSS = $CSS_TMP; } } }   \/\/ \u0421\u0447\u0438\u0442\u0430\u044e \u0440\u0430\u0437\u043c\u0435\u0440 CSS \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0443, \u0442\u043a \u0435\u0441\u0442\u044c \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0433\u0443\u0433\u043b\u0430 \u0432 70 \u043a\u0431  if (!empty($CSS)) {             $CSS = ' &lt;style amp-custom> \/*'.mb_strlen($CSS).'*\/ '.$CSS.' &lt;\/style> '; }  return $CSS; } } ?><\/code><\/pre>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u043b Javascript<\/strong><\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Javascript \u0432 AMP \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443 \u043d\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043d\u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0430 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 &#171;\u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0449\u0438\u0435&#187; \u0438\u0437 \u044f\u0434\u0440\u0430 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430 &#8212; \u0443\u0434\u0430\u043b\u044f\u044e \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 OnEndBufferContent.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEndBufferContent\",\"OnEndBufferContentHandler\");  function OnEndBufferContentHandler(&amp;$content) { $content = OnEndBufferContentParse($content); }  function OnEndBufferContentParse($HTML) { if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") {   $HTML_TMP = preg_replace('\/(&lt;script type=\"text\\\/javascript\".*?&lt;\\\/script>|&lt;script>.*?&lt;\\\/script>)\/isu',\"\",$HTML); if (!empty($HTML_TMP)) {$HTML = $HTML_TMP;} }  return $HTML; } ?><\/code><\/pre>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u044e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u044b\u0439 \u043a\u0435\u0448 \u0434\u043b\u044f AMP \u0432\u0435\u0440\u0441\u0438\u0438, \u0442.\u043a. \u0434\u043b\u044f \u0435\u0433\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u0435\u043d Javascript, \u0430 \u043e\u043d \u0432 AMP \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u044b\u0448\u0435 \u0443\u0434\u0430\u043b\u0451\u043d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/70c\/37b\/130\/70c37b1309d9bf098e8a17738078976e.png\" width=\"1398\" height=\"232\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70c\/37b\/130\/70c37b1309d9bf098e8a17738078976e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e AMP_ENABLE \u0432 &#171;\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u0439\u0442\u0430&#187;, \u0435\u0433\u043e \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 &lt;head>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b04\/3de\/ea0\/b043deea06eaab055533cfcf7db2c9ff.png\" width=\"1536\" height=\"736\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b04\/3de\/ea0\/b043deea06eaab055533cfcf7db2c9ff.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 OnEpilog.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEpilog\",\"META_AMP\");  function META_AMP() { global $APPLICATION;  $URL_CANONICAL = $_SERVER['REQUEST_URI'];  $AMP_ENABLE = $APPLICATION->GetProperty(\"AMP_ENABLE\");  \/\/ \u0414\u043b\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e canonical \u043d\u0430 \u041d\u0415 AMP if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") { $APPLICATION->SetPageProperty(\"canonical\",'https:\/\/'.SITE_SERVER_NAME.str_replace('\/amp','',$URL_CANONICAL)); } else { \/\/ \u0414\u043b\u044f \u041d\u0415 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 AMP if ($AMP_ENABLE == \"Y\") { $APPLICATION->AddHeadString('&lt;link rel=\"amphtml\" href=\"https:\/\/'.SITE_SERVER_NAME.'\/amp'.$URL_CANONICAL.'\" \/>',true); } } } ?><\/code><\/pre>\n<h4>3. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430<\/h4>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0442\u043e\u0447\u043a\u0430\u0445.<\/p>\n<p>\u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0430\u0439\u0442\u0430 \u0434\u0435\u043b\u0430\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1ab\/d9f\/c02\/1abd9fc02ba61215cb2ad700affeefff.png\" alt=\"\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP\" title=\"\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP\" width=\"1112\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1ab\/d9f\/c02\/1abd9fc02ba61215cb2ad700affeefff.png\"\/><figcaption>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a1\/0f4\/187\/3a10f4187002baa908177fb0d3b5248c.png\" alt=\"\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" title=\"\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" width=\"1035\" height=\"266\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a1\/0f4\/187\/3a10f4187002baa908177fb0d3b5248c.png\"\/><figcaption>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0432 &lt;head>.<\/p>\n<p>\u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u044e \u043c\u0435\u0442\u0443:<\/p>\n<pre><code class=\"php\">&lt;? $APPLICATION->ShowHead(); ?><\/code><\/pre>\n<p>\u0412 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u043b\u044e\u0441 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 AMP_CSS:<\/p>\n<pre><code class=\"php\">&lt;? $APPLICATION->ShowMeta(\"robots\"); ?> &lt;? $APPLICATION->ShowMeta(\"keywords\"); ?> &lt;? $APPLICATION->ShowMeta(\"description\"); ?> &lt;? $APPLICATION->ShowLink(\"canonical\"); ?> &lt;? $APPLICATION->ShowHeadStrings(); ?> &lt;? $APPLICATION->AddBufferContent(\"AMP_CSS\"); ?><\/code><\/pre>\n<p>ShowHead \u0432 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u0442.\u043a. \u0432 \u043d\u0435\u0439 &#171;\u043f\u0440\u0438\u0434\u0443\u0442&#187; \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u043b\u044f AMP \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b: &lt;script> \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 CSS.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d0\/c19\/5b7\/9d0c195b7fd3e81fb50f6c30e36304fe.png\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438\" width=\"1876\" height=\"517\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d0\/c19\/5b7\/9d0c195b7fd3e81fb50f6c30e36304fe.png\"\/><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f AMP \u0432\u0435\u0440\u0441\u0438\u0438 &#8212; CSS \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0435 AMP JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ef\/120\/fed\/3ef120fed0c0edf0c0c5a38295ea08cf.png\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CSS \u0438 JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 AMP \u0448\u0430\u0431\u043b\u043e\u043d\u0435\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CSS \u0438 JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 AMP \u0448\u0430\u0431\u043b\u043e\u043d\u0435\" width=\"2827\" height=\"474\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ef\/120\/fed\/3ef120fed0c0edf0c0c5a38295ea08cf.png\"\/><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CSS \u0438 JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 AMP \u0448\u0430\u0431\u043b\u043e\u043d\u0435<\/figcaption><\/figure>\n<p>\u0423 AMP \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u043e\u0440\u043c (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: amp-form), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u0438\u0445 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c data-skip-moving=&#187;true&#187;, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432 &lt;head>, \u0430 \u043d\u0435 \u0443\u0448\u043b\u0438 \u0432\u043d\u0438\u0437 \u043f\u0440\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 (\u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430).<\/p>\n<h4>4. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h4>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0421\u043f\u0438\u0441\u043a\u0430 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0444\u0430\u0439\u043b .parameters.php \u0438 \u0432 \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_AMP:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/562\/26f\/469\/56226f469b6b67c9521aa96ad4c61c31.png\" alt=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" title=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" width=\"1335\" height=\"418\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/562\/26f\/469\/56226f469b6b67c9521aa96ad4c61c31.png\"\/><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0435\u0448\u0430, \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438\u0431\u043e \u043e\u0434\u0438\u043d \u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/68d\/692\/0e0\/68d6920e007dc7b07518a619ea1cebae.png\" alt=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" title=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\" width=\"1157\" height=\"386\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68d\/692\/0e0\/68d6920e007dc7b07518a619ea1cebae.png\"\/><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u0435\u043b\u0430\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043a\u0430\u043a \u0438 \u0432\u044b\u0448\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b18\/02c\/0b7\/b1802c0b7403eb019a66e39f93602365.png\" alt=\"\u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 AMP\" title=\"\u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 AMP\" width=\"1916\" height=\"552\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b18\/02c\/0b7\/b1802c0b7403eb019a66e39f93602365.png\"\/><figcaption>\u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 AMP<\/figcaption><\/figure>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0430\u0439\u0442\u0430.<\/p>\n<h4>5. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043d\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 &#8212; \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u043d\u0430 \u0448\u0430\u0433\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0434\u0435\u043b\u0430\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187; \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 2 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 HTML \u0438 HTML \u0434\u043b\u044f AMP.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d93\/177\/0cc\/d931770cc3b936fdab4416ea841f5a95.png\" alt=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &quot;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&quot;\" title=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &quot;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&quot;\" width=\"1780\" height=\"1561\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d93\/177\/0cc\/d931770cc3b936fdab4416ea841f5a95.png\"\/><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187;<\/figcaption><\/figure>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ca5\/6cb\/5ac\/ca56cb5ac05428a36ea78e314d8da408.png\" alt=\"\u041a\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &quot;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&quot;\" title=\"\u041a\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &quot;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&quot;\" width=\"1684\" height=\"1045\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ca5\/6cb\/5ac\/ca56cb5ac05428a36ea78e314d8da408.png\"\/><figcaption>\u041a\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187;<\/figcaption><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043b\u044e\u0431\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0440\u0430\u0437\u0443, \u043b\u0438\u0431\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u041d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 AMP, \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187; \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 html-\u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u0432 \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0430\u0439\u0442\u0443 \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c 2 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<h4>6. \u0412\u043a\u043b\u044e\u0447\u0438\u043b AMP<\/h4>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 AMP_ENABLE:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/01d\/0ec\/797\/01d0ec797aea33598161abd918fc5389.png\" width=\"1314\" height=\"123\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01d\/0ec\/797\/01d0ec797aea33598161abd918fc5389.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043d\u0438\u0445 \u0432 &lt;head> \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 AMP:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3d2\/f06\/116\/3d2f06116b63986c170ce9e9dc1a5244.png\" alt=\"\u0421\u0441\u044b\u043b\u043a\u0430 \u0432 &lt;head> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b&#187; title=&#187;\u0421\u0441\u044b\u043b\u043a\u0430 \u0432 &lt;head> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b&#187; width=&#187;1100&#8243; height=&#187;58&#8243; data-src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3d2\/f06\/116\/3d2f06116b63986c170ce9e9dc1a5244.png&#187;\/><figcaption>\u0421\u0441\u044b\u043b\u043a\u0430 \u0432 &lt;head> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72a\/d5b\/ce9\/72ad5bce91459e3442e0e7dbf5b146f1.png\" alt=\"Canonical \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 AMP \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443\" title=\"Canonical \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 AMP \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443\" width=\"1122\" height=\"47\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72a\/d5b\/ce9\/72ad5bce91459e3442e0e7dbf5b146f1.png\"\/><figcaption>Canonical \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 AMP \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443<\/figcaption><\/figure>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043b\u044e\u0431\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u0443\u0433\u043b\u043e\u043c.<\/p>\n<h3>\u041e\u0431\u0449\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/h3>\n<p>AMP \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0432 CSS, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0440\u044f\u0434\u0430 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 (\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438) \u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u044a\u0451\u043c\u0435 \u0432 70 \u041a\u0431 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>\u041f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u0430 \u0441\u0442\u0438\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c amp-. \u041c\u043e\u0436\u043d\u043e \u043d\u0430 AMP \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438. \u0417\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>Javascript \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0430 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c, \u043c\u0435\u043d\u044e, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<p>\u0412 \u0441\u0441\u044b\u043b\u043a\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043c\u0435\u043d\u044e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 URL_PREFIX:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dab\/e1e\/44a\/dabe1e44aa534d26b03b88e737f87eba.png\" width=\"1412\" height=\"187\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dab\/e1e\/44a\/dabe1e44aa534d26b03b88e737f87eba.png\"\/><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/694264\/\"> https:\/\/habr.com\/ru\/post\/694264\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c AMP \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u0441\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 1\u0421-\u0411\u0438\u0442\u0440\u0438\u043a\u0441 \u0438 \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong> AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c;<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e<\/strong> \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0445\u043e\u0442\u044c \u0438 \u0432 \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0412 AMP \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u0430\u043a <strong>\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/strong>, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u0437 \u0438\u043d\u0444\u043e\u0431\u043b\u043e\u043a\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u043d\u043e\u0432\u043e\u0441\u0442\u0438), \u0442\u0430\u043a \u0438 <strong>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/strong> \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b<\/h3>\n<h4>1. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0441\u0438\u043d\u0433<\/h4>\n<p>\u0415\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 AMP, \u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c\u0438 \u043f\u043e \u0432\u0438\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0431\u0437\u0430\u0446\u0435\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0441\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0435\u0441\u043b\u0438 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043f\u043e\u0434 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e Google, \u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e.<\/p>\n<h4>2. \u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043f\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044e AMP, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043e \u043d\u0438\u0445 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043b\u0438\u0437\u0430, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438.<\/p>\n<h4>1. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 URL \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \/amp\/.<\/h4>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e URL \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 AMP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: domain.com\/about\/ \u0438 domain.com\/amp\/about\/, \u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u0438 \u043e\u0431\u0430 URL \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0430\u043f\u043a\u0443 &#8212; \/about\/.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite \u0432 .htaccess, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a URL \u0441 \/amp\/ \u0434\u0435\u043b\u0430\u044e rewrite \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u0431\u0435\u0437 AMP \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e HTML_TYPE=AMP , \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 init.php.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 .htaccess \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 AMP<\/p>\n<pre><code>&lt;IfModule mod_rewrite.c>     RewriteEngine On          # Google AMP          # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f URL \u0432\u0438\u0434\u0430 \/amp\/about\/delivery.php     RewriteRule ^amp\/(.+)\/(.+)\\.(php|html)$ $1\/$2.$3?HTML_TYPE=AMP [L,QSA]      # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f URL \u0432\u0438\u0434\u0430 \/amp\/about\/     RewriteRule ^amp\/(.+)\/?$ $1\/index.php?HTML_TYPE=AMP [L,QSA]      # \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439     RewriteRule ^amp\/?$ index.php?HTML_TYPE=AMP [L,QSA] &lt;\/IfModule><\/code><\/pre>\n<h4>2. \u041d\u0430\u0443\u0447\u0438\u043b \u0431\u0438\u0442\u0440\u0438\u043a\u0441 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c<\/h4>\n<p>\u0414\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0432\u0435\u0441\u044c CSS \u0441\u0434\u0435\u043b\u0430\u0442\u044c inline \u0432 &lt;head><\/p>\n<\/li>\n<li>\n<p>\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0435\u0441\u044c Javascript<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 init.php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445: HTML_TYPE \u0438 URL_PREFIX.<\/p>\n<pre><code class=\"php\">&lt;?php \/\/ \u0415\u0441\u043b\u0438 \u0432 URL \u0435\u0441\u0442\u044c AMP, \u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u0434\u0432\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445  if ($_REQUEST[\"HTML_TYPE\"] == \u201cAMP\u201d) {   define(\"HTML_TYPE\",$_REQUEST[\"HTML_TYPE\"]);   define(\"URL_PREFIX\",\"\/amp\"); }  if (!defined(\"HTML_TYPE\")) {   define(\"HTML_TYPE\",\"\");   define(\"URL_PREFIX\",\"\"); } ?><\/code><\/pre>\n<p><strong>\u041f\u0435\u0440\u0435\u043d\u0451\u0441 CSS \u0432 inline<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 CSS \u0432 inline \u0434\u0435\u043b\u0430\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e AMP_CSS \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 OnEpilog, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEpilog\",\"AMP_CSS\");  function AMP_CSS() { global $APPLICATION;  if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") { \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0432\u0441\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430 CSS, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043d\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e GetCSS;  $CSS_FILE = $APPLICATION->GetCSS();  if (!empty($CSS_FILE)) { \/\/ \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u044e \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 href \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 preg_match_all('\/href=\"(.+?)\\?.+?\"\/isu',$CSS_FILE,$CSS_FILE_MATCHES);  if (sizeof($CSS_FILE_MATCHES[1]) > 0) { foreach($CSS_FILE_MATCHES[1] as $CSS_FILE_MATCHES_VAL) { $CSS .= file_get_contents($_SERVER['DOCUMENT_ROOT'].$CSS_FILE_MATCHES_VAL); } }  if (!empty($CSS)) { $CSS_TMP = str_replace(array('!important'),'',$CSS);  if (!empty($CSS_TMP)) { $CSS = $CSS_TMP; } } }   \/\/ \u0421\u0447\u0438\u0442\u0430\u044e \u0440\u0430\u0437\u043c\u0435\u0440 CSS \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0443, \u0442\u043a \u0435\u0441\u0442\u044c \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0433\u0443\u0433\u043b\u0430 \u0432 70 \u043a\u0431  if (!empty($CSS)) {             $CSS = ' &lt;style amp-custom> \/*'.mb_strlen($CSS).'*\/ '.$CSS.' &lt;\/style> '; }  return $CSS; } } ?><\/code><\/pre>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u043b Javascript<\/strong><\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Javascript \u0432 AMP \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443 \u043d\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043d\u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0430 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 &#171;\u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0449\u0438\u0435&#187; \u0438\u0437 \u044f\u0434\u0440\u0430 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430 &#8212; \u0443\u0434\u0430\u043b\u044f\u044e \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 OnEndBufferContent.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEndBufferContent\",\"OnEndBufferContentHandler\");  function OnEndBufferContentHandler(&amp;$content) { $content = OnEndBufferContentParse($content); }  function OnEndBufferContentParse($HTML) { if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") {   $HTML_TMP = preg_replace('\/(&lt;script type=\"text\\\/javascript\".*?&lt;\\\/script>|&lt;script>.*?&lt;\\\/script>)\/isu',\"\",$HTML); if (!empty($HTML_TMP)) {$HTML = $HTML_TMP;} }  return $HTML; } ?><\/code><\/pre>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u044e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0442\u043d\u044b\u0439 \u043a\u0435\u0448 \u0434\u043b\u044f AMP \u0432\u0435\u0440\u0441\u0438\u0438, \u0442.\u043a. \u0434\u043b\u044f \u0435\u0433\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u0435\u043d Javascript, \u0430 \u043e\u043d \u0432 AMP \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u044b\u0448\u0435 \u0443\u0434\u0430\u043b\u0451\u043d.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e AMP_ENABLE \u0432 &#171;\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u0439\u0442\u0430&#187;, \u0435\u0433\u043e \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 &lt;head>.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 OnEpilog.<\/p>\n<pre><code class=\"php\">&lt;?php AddEventHandler(\"main\",\"OnEpilog\",\"META_AMP\");  function META_AMP() { global $APPLICATION;  $URL_CANONICAL = $_SERVER['REQUEST_URI'];  $AMP_ENABLE = $APPLICATION->GetProperty(\"AMP_ENABLE\");  \/\/ \u0414\u043b\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e canonical \u043d\u0430 \u041d\u0415 AMP if (defined(\"HTML_TYPE\") and HTML_TYPE == \"AMP\") { $APPLICATION->SetPageProperty(\"canonical\",'https:\/\/'.SITE_SERVER_NAME.str_replace('\/amp','',$URL_CANONICAL)); } else { \/\/ \u0414\u043b\u044f \u041d\u0415 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 AMP if ($AMP_ENABLE == \"Y\") { $APPLICATION->AddHeadString('&lt;link rel=\"amphtml\" href=\"https:\/\/'.SITE_SERVER_NAME.'\/amp'.$URL_CANONICAL.'\" \/>',true); } } } ?><\/code><\/pre>\n<h4>3. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430<\/h4>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0442\u043e\u0447\u043a\u0430\u0445.<\/p>\n<p>\u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0430\u0439\u0442\u0430 \u0434\u0435\u043b\u0430\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<figure class=\"full-width\"><figcaption>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f AMP<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0432 &lt;head>.<\/p>\n<p>\u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u044e \u043c\u0435\u0442\u0443:<\/p>\n<pre><code class=\"php\">&lt;? $APPLICATION->ShowHead(); ?><\/code><\/pre>\n<p>\u0412 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u043b\u044e\u0441 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 AMP_CSS:<\/p>\n<pre><code class=\"php\">&lt;? $APPLICATION->ShowMeta(\"robots\"); ?> &lt;? $APPLICATION->ShowMeta(\"keywords\"); ?> &lt;? $APPLICATION->ShowMeta(\"description\"); ?> &lt;? $APPLICATION->ShowLink(\"canonical\"); ?> &lt;? $APPLICATION->ShowHeadStrings(); ?> &lt;? $APPLICATION->AddBufferContent(\"AMP_CSS\"); ?><\/code><\/pre>\n<p>ShowHead \u0432 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f, \u0442.\u043a. \u0432 \u043d\u0435\u0439 &#171;\u043f\u0440\u0438\u0434\u0443\u0442&#187; \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u043b\u044f AMP \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b: &lt;script> \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 CSS.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Javascript \u0438 CSS \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f AMP \u0432\u0435\u0440\u0441\u0438\u0438 &#8212; CSS \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0435 AMP JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CSS \u0438 JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 AMP \u0448\u0430\u0431\u043b\u043e\u043d\u0435<\/figcaption><\/figure>\n<p>\u0423 AMP \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u043e\u0440\u043c (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: amp-form), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u0438\u0445 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c data-skip-moving=&#187;true&#187;, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432 &lt;head>, \u0430 \u043d\u0435 \u0443\u0448\u043b\u0438 \u0432\u043d\u0438\u0437 \u043f\u0440\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 (\u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0430).<\/p>\n<h4>4. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h4>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0421\u043f\u0438\u0441\u043a\u0430 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0444\u0430\u0439\u043b .parameters.php \u0438 \u0432 \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_AMP:<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0435\u0448\u0430, \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438\u0431\u043e \u043e\u0434\u0438\u043d \u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 HTML_TYPE \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/figcaption><\/figure>\n<p>\u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u0435\u043b\u0430\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043a\u0430\u043a \u0438 \u0432\u044b\u0448\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 AMP<\/figcaption><\/figure>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0430\u0439\u0442\u0430.<\/p>\n<h4>5. \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043d\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 &#8212; \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u043d\u0430 \u0448\u0430\u0433\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0434\u0435\u043b\u0430\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187; \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 2 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 HTML \u0438 HTML \u0434\u043b\u044f AMP.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187;<\/figcaption><\/figure>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption>\u041a\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187;<\/figcaption><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043b\u044e\u0431\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0440\u0430\u0437\u0443, \u043b\u0438\u0431\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u041d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 AMP, \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#171;\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 HTML&#187; \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 html-\u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u0432 \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0430\u0439\u0442\u0443 \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c 2 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<h4>6. \u0412\u043a\u043b\u044e\u0447\u0438\u043b AMP<\/h4>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 AMP_ENABLE:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043d\u0438\u0445 \u0432 &lt;head> \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 AMP:<\/p>\n<figure class=\"full-width\"> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b&#187; title=&#187;\u0421\u0441\u044b\u043b\u043a\u0430 \u0432 &lt;head> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b&#187; width=&#187;1100&#8243; height=&#187;58&#8243; data-src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3d2\/f06\/116\/3d2f06116b63986c170ce9e9dc1a5244.png&#187;\/><figcaption>\u0421\u0441\u044b\u043b\u043a\u0430 \u0432 &lt;head> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 AMP \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e:<\/p>\n<figure class=\"full-width\"><figcaption>Canonical \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 AMP \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443<\/figcaption><\/figure>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043b\u044e\u0431\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0447\u043d\u0443\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u0443\u0433\u043b\u043e\u043c.<\/p>\n<h3>\u041e\u0431\u0449\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/h3>\n<p>AMP \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0432 CSS, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0440\u044f\u0434\u0430 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 (\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438) \u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u044a\u0451\u043c\u0435 \u0432 70 \u041a\u0431 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>\u041f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u0430 \u0441\u0442\u0438\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c amp-. \u041c\u043e\u0436\u043d\u043e \u043d\u0430 AMP \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438. \u0417\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>Javascript \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0430 AMP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e JS-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c, \u043c\u0435\u043d\u044e, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<p>\u0412 \u0441\u0441\u044b\u043b\u043a\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043c\u0435\u043d\u044e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 URL_PREFIX:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/694264\/\"> https:\/\/habr.com\/ru\/post\/694264\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-339970","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=339970"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339970\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}