AMP
왜 AMP 를 살펴보기 시작하였나?
AMP HTML
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<link rel="canonical" href="hello-world.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>Hello World!</body>
</html>AMP Script
AMP Cache
1) 모든 AMP JavaScript 를 비동기로 호출
2) 모든 리소스를 정적으로 계산
3) Extension mechanism이 렌더링을 블로킹하게 두지 않음
4) third-party JavaScript는 Critical Path에서 제외하도록 해라
5) 모든 CSS는 inline이여야 하고, size 제한이 있다.
6) Font는 효율적으로 로드된다.
7) Style Recaclutation을 최소화 한다.
8) 애니메이션은 GPU 환경에서만 실행된다.
9) 페이지를 즉각 로드한다.
Last updated