{"id":298,"date":"2026-09-06T01:22:59","date_gmt":"2026-09-05T17:22:59","guid":{"rendered":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/interview-frontend-performance-30q\/"},"modified":"2026-09-06T01:22:59","modified_gmt":"2026-09-05T17:22:59","slug":"interview-frontend-performance-30q","status":"publish","type":"post","link":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/interview-frontend-performance-30q\/","title":{"rendered":"\u524d\u7aef\u6027\u80fd\u4f18\u5316 30 \u95ee\uff1a\u4ece\u6307\u6807\u53e3\u5f84\u5230\u6743\u8861\u51b3\u7b56"},"content":{"rendered":"<div style=\"font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",sans-serif;font-size:16.5px;line-height:1.9;color:#35435c;letter-spacing:.2px\">\n<div style=\"background:linear-gradient(135deg,#f5f9ff,#eef5ff);border:1px solid #dce8f8;border-left:4px solid #3ecf8e;border-radius:12px;padding:16px 20px;margin:0 0 24px;font-size:14.5px;color:#3d5570;line-height:2\"><span style=\"display:inline-block;background:#3ecf8e;color:#fff;font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:6px;margin-right:12px;letter-spacing:1px;vertical-align:1px\">\u5173\u952e\u8bcd<\/span>\u524d\u7aef\u6027\u80fd\u9762\u8bd5\u3001\u6027\u80fd\u4f18\u5316 30 \u95ee\u3001INP\u3001LCP\u3001\u865a\u62df\u5217\u8868\u3001\u6027\u80fd\u9884\u7b97<\/div>\n<div style=\"background:#fafbfd;border:1px solid #e8edf5;border-radius:12px;padding:18px 22px;margin:0 0 30px\">\n<div style=\"font-size:13.5px;font-weight:700;color:#8a99ae;letter-spacing:2px;margin-bottom:12px\">\u76ee\u5f55<\/div>\n<ol style=\"margin:0;padding-left:20px\">\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-1\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e00\u3001\u6307\u6807\u4e0e\u53e3\u5f84\uff086 \u95ee\uff09<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-2\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e8c\u3001\u52a0\u8f7d\u4f18\u5316\uff089 \u95ee\uff09<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-3\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e09\u3001\u6e32\u67d3\u4e0e\u6267\u884c\u4f18\u5316\uff0810 \u95ee\uff09<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-4\" style=\"color:#42546e;text-decoration:none;border:none\">\u56db\u3001\u5de5\u7a0b\u4e0e\u6743\u8861\uff085 \u95ee\uff09<\/a><\/li>\n<\/ol>\n<\/div>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><span style=\"font-size:17px;color:#1e2f47\">\u6027\u80fd\u4f18\u5316\u662f\u524d\u7aef\u9762\u8bd5\u7684\u5fc5\u8003\u9898\uff0c\u4f46\u591a\u6570\u56de\u7b54\u505c\u7559\u5728\u300c\u61d2\u52a0\u8f7d\u3001\u538b\u7f29\u3001CDN\u300d\u7684\u80cc\u8bf5\u5c42\u9762\u3002\u8fd9\u4efd 30 \u95ee\u6309\u9762\u8bd5\u5b98\u7684\u771f\u5b9e\u8ffd\u95ee\u8def\u5f84\u7ec4\u7ec7\uff1a\u4ece\u6307\u6807\u53e3\u5f84\uff0c\u5230\u52a0\u8f7d\/\u6e32\u67d3\/\u6267\u884c\u4e09\u4e2a\u5c42\u9762\uff0c\u518d\u5230\u6743\u8861\u51b3\u7b56\u2014\u2014\u6bcf\u4e00\u95ee\u90fd\u7ed9\u51fa\u300c\u5408\u683c\u56de\u7b54\u300d\u4e0e\u300c\u52a0\u5206\u56de\u7b54\u300d\u7684\u5dee\u522b\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #3ecf8e;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-1\">\u4e00\u3001\u6307\u6807\u4e0e\u53e3\u5f84\uff086 \u95ee\uff09<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">1. Core Web Vitals \u662f\u54ea\u4e09\u4e2a\u6307\u6807\uff0c\u9608\u503c\u5206\u522b\u662f\u591a\u5c11\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">LCP \u2264 2.5s\u3001INP \u2264 200ms\u3001CLS \u2264 0.1\uff08p75 \u53e3\u5f84\uff0c\u89c1 <a href=\"https:\/\/web.dev\/articles\/vitals\" target=\"_blank\" rel=\"noopener\" style=\"color:#3ecf8e;text-decoration:none;border-bottom:1px solid #3ecf8e66;transition:opacity .15s\">web.dev<\/a>\uff09\u3002\u52a0\u5206\u70b9\uff1a\u4e3b\u52a8\u8bf4\u660e INP \u4e8e 2024 \u5e74 3 \u6708\u53d6\u4ee3 FID\uff0c\u4e14\u8861\u91cf\u7684\u662f<strong style=\"color:#0f1c2e;font-weight:600\">\u6240\u6709\u4ea4\u4e92<\/strong>\u7684\u6700\u5dee\u54cd\u5e94\u800c\u975e\u9996\u4e2a\u4ea4\u4e92\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">2. LCP \u5019\u9009\u5143\u7d20\u53ef\u80fd\u662f\u54ea\u4e9b\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9996\u5c4f\u6700\u5927\u7684\u56fe\u7247\u3001\u80cc\u666f\u56fe\u3001video \u9996\u5e27\u3001\u6587\u672c\u5757\u3002\u52a0\u5206\u70b9\uff1a\u77e5\u9053 LCP \u53ef\u80fd\u53d8\u5316\uff08\u66f4\u5927\u5143\u7d20\u51fa\u73b0\u4f1a\u66f4\u65b0\uff09\uff0c\u4ee5\u53ca <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">element.getBoundingClientRect<\/code> \u4e0d\u53ef\u9760\u3001\u8981\u7528 PerformanceObserver\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">3. \u4e3a\u4ec0\u4e48 INP \u6bd4 FID \u4e25\u683c\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">FID \u53ea\u6d4b\u9996\u4e2a\u4ea4\u4e92\u7684\u8f93\u5165\u5ef6\u8fdf\uff0cINP \u6d4b\u6574\u4e2a\u751f\u547d\u5468\u671f\u5185\u6240\u6709\u4ea4\u4e92\u7684<strong style=\"color:#0f1c2e;font-weight:600\">\u6700\u5dee\u60c5\u51b5<\/strong>\uff0c\u8986\u76d6\u8f93\u5165\u5ef6\u8fdf + \u4e8b\u4ef6\u5904\u7406 + \u6e32\u67d3\u63d0\u4ea4\u7684\u5b8c\u6574\u94fe\u8def\u3002 hydrate \u672a\u5b8c\u6210\u65f6\u7ed1\u5b9a\u7684\u4ea4\u4e92\u4f1a\u5728 INP \u4e0a\u73b0\u5f62\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">4. TTFB \u9ad8\u8bf4\u660e\u4ec0\u4e48\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u670d\u52a1\u7aef\u6162\u3001\u7f51\u7edc\u94fe\u8def\u5dee\u6216 CDN \u672a\u547d\u4e2d\u3002\u5b83\u662f LCP \u7684\u524d\u7f6e\u74f6\u9888\u2014\u2014TTFB \u5360\u6389 1s\uff0c\u524d\u7aef\u4f18\u5316\u7a7a\u95f4\u5c31\u88ab\u538b\u7f29\u4e00\u534a\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">5. \u5b9e\u9a8c\u5ba4\u6570\u636e\u4e0e\u771f\u5b9e\u7528\u6237\uff08RUM\uff09\u6570\u636e\u7684\u5dee\u5f02\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5b9e\u9a8c\u5ba4\u53ef\u63a7\u53ef\u56de\u5f52\u4f46\u8bbe\u5907\/\u7f51\u7edc\u7406\u60f3\u5316\uff1bRUM \u53cd\u6620\u771f\u5b9e\u5206\u5e03\uff08\u770b p75 \u800c\u4e0d\u662f\u5747\u503c\uff09\u3002\u751f\u4ea7\u51b3\u7b56\u4ee5 RUM \u4e3a\u51c6\uff0c\u53d1\u5e03\u95e8\u7981\u7528\u5b9e\u9a8c\u5ba4\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">6. \u91c7\u6837\u7387\u600e\u4e48\u5b9a\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5934\u90e8\u9875\u9762\u9ad8\u91c7\u6837\u3001\u957f\u5c3e\u4f4e\u91c7\u6837\uff1b\u9519\u8bef\u7c7b\u5168\u91cf\u3001\u6027\u80fd\u7c7b\u6309\u6d41\u91cf\u5206\u7ea7\u3002\u5173\u952e\u662f\u4fdd\u8bc1 p75 \u7edf\u8ba1\u7684\u6837\u672c\u91cf\u5145\u8db3\u3002<\/p>\n<figure style=\"margin:30px 0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"900\" src=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig.png\" alt=\"\u524d\u7aef\u6027\u80fd\u4f18\u5316\u7684\u56db\u4e2a\u5c42\u6b21\" class=\"wp-image-297\" style=\"max-width:100%;height:auto;border-radius:12px;border:1px solid #e6ecf4;box-shadow:0 8px 24px rgba(15,30,60,.07)\" srcset=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig.png 1200w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig-300x225.png 300w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig-1024x768.png 1024w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig-768x576.png 768w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/interview-frontend-performance-30q-fig-800x600.png 800w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption style=\"margin-top:12px;font-size:13.5px;color:#7b8aa0;text-align:center;line-height:1.75\"><\/figcaption><\/figure>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #3ecf8e;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-2\">\u4e8c\u3001\u52a0\u8f7d\u4f18\u5316\uff089 \u95ee\uff09<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">7. \u5173\u952e\u6e32\u67d3\u8def\u5f84\u662f\u4ec0\u4e48\uff1f\u600e\u4e48\u538b\u7f29\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">HTML \u2192 CSSOM \u2192 DOM \u2192 \u6e32\u67d3\u6811 \u2192 \u5e03\u5c40 \u2192 \u7ed8\u5236\u3002\u538b\u7f29\u624b\u6bb5\uff1aCSS \u5185\u8054\u5173\u952e\u6837\u5f0f\u3001\u975e\u5173\u952e CSS \u5f02\u6b65\u52a0\u8f7d\u3001JS \u52a0 defer\/async\u3001\u51cf\u5c11\u963b\u585e\u8d44\u6e90\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">8. script \u7684 defer \u4e0e async \u533a\u522b\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u90fd\u4e0d\u963b\u585e\u89e3\u6790\uff1bdefer \u6309\u5e8f\u5728 DOMContentLoaded \u524d\u6267\u884c\uff0casync \u4e0b\u8f7d\u5b8c\u7acb\u5373\u6267\u884c\u987a\u5e8f\u4e0d\u5b9a\u3002\u6709\u4f9d\u8d56\u7528 defer\uff0c\u72ec\u7acb\u811a\u672c\u7528 async\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">9. \u56fe\u7247\u4f18\u5316\u7684\u5b8c\u6574\u6e05\u5355\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">WebP\/AVIF \u683c\u5f0f\u3001\u54cd\u5e94\u5f0f srcset + sizes\u3001\u61d2\u52a0\u8f7d\uff08<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">loading=\"lazy\"<\/code>\uff09\u3001\u9996\u5c4f\u56fe preload + fetchpriority=&#8221;high&#8221;\u3001\u5c3a\u5bf8\u7ea6\u675f\u9632 CLS\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">10. \u9884\u52a0\u8f7d\u5bb6\u65cf\u600e\u4e48\u7528\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">dns-prefetch \u63d0\u524d\u89e3\u6790\u3001preconnect \u5efa\u8fde\u3001preload \u5f53\u524d\u9875\u5173\u952e\u8d44\u6e90\u3001prefetch \u4e0b\u4e00\u9875\u8d44\u6e90\u3001modulepreload \u6a21\u5757\u3002\u52a0\u5206\u70b9\uff1a\u8bf4\u660e preload \u6ee5\u7528\u4f1a\u6d6a\u8d39\u5e26\u5bbd\u5e76\u89e6\u53d1\u63a7\u5236\u53f0\u544a\u8b66\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">11. \u7f13\u5b58\u7b56\u7565\u600e\u4e48\u8bbe\u8ba1\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5e26 hash \u7684\u9759\u6001\u8d44\u6e90 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">Cache-Control: max-age=31536000, immutable<\/code>\uff1bHTML \u7528 no-cache \u534f\u5546\u7f13\u5b58\uff1b\u63a5\u53e3\u6309\u4e1a\u52a1\u5b9a\uff08\u79c1\u6709\u6570\u636e no-store\uff09\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">12. \u5f3a\u7f13\u5b58\u4e0e\u534f\u5546\u7f13\u5b58\u7684\u89e6\u53d1\u6761\u4ef6\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5f3a\u7f13\u5b58\u547d\u4e2d\u4e0d\u53d1\u8bf7\u6c42\uff08Expires\/Cache-Control\uff09\uff1b\u534f\u5546\u7f13\u5b58\u53d1\u8bf7\u6c42\u9a8c\u8bc1\uff08ETag\/If-None-Match \u6216 Last-Modified\/If-Modified-Since\uff09\uff0c304 \u8fd4\u56de\u7a7a\u4f53\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">13. CDN \u547d\u4e2d\u7387\u600e\u4e48\u4f18\u5316\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">URL \u7a33\u5b9a\u5316\uff08hash \u53d8\u5316\u53ea\u5f71\u54cd\u53d8\u5316\u7684\u6587\u4ef6\uff09\u3001\u5408\u7406\u8bbe\u7f6e\u6e90\u7ad9\u7f13\u5b58\u5934\u3001\u9884\u70ed\u70ed\u95e8\u8d44\u6e90\u3001\u56de\u6e90\u5408\u5e76\uff08coalescing\uff09\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">14. \u9996\u5c4f\u63a5\u53e3\u591a\u4e14\u76f8\u4e92\u4f9d\u8d56\u600e\u4e48\u529e\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u670d\u52a1\u7aef\u805a\u5408\uff08BFF \u4e00\u6b21\u4e0b\u53d1\uff09\u3001\u65e0\u4f9d\u8d56\u63a5\u53e3\u5e76\u884c\u3001\u4e0b\u6e38\u6570\u636e SSR \u76f4\u51fa\u3002\u6838\u5fc3\u601d\u8def\uff1a\u628a\u300c\u6d4f\u89c8\u5668\u89c6\u89d2\u7684\u7011\u5e03\u300d\u53d8\u6210\u300c\u670d\u52a1\u7aef\u5185\u7f51\u7684\u5e76\u884c\u300d\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">15. \u9aa8\u67b6\u5c4f\u7684\u4ef7\u503c\u4e0e\u9677\u9631\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u964d\u4f4e\u611f\u77e5\u5ef6\u8fdf\u3001\u7ea6\u675f\u5e03\u5c40\u9632 CLS\uff1b\u9677\u9631\u662f\u9aa8\u67b6\u4e0e\u771f\u5b9e\u5185\u5bb9\u5e03\u5c40\u4e0d\u4e00\u81f4\u65f6\u53cd\u800c\u589e\u52a0\u8df3\u52a8\u611f\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #3ecf8e;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-3\">\u4e09\u3001\u6e32\u67d3\u4e0e\u6267\u884c\u4f18\u5316\uff0810 \u95ee\uff09<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">16. \u91cd\u6392\uff08reflow\uff09\u4e0e\u91cd\u7ed8\uff08repaint\uff09\u7684\u533a\u522b\u4e0e\u4f18\u5316\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u91cd\u6392\u6d89\u53ca\u51e0\u4f55\u8ba1\u7b97\uff0c\u4ee3\u4ef7\u8fdc\u9ad8\u4e8e\u91cd\u7ed8\u3002\u6279\u91cf\u4fee\u6539\uff08DocumentFragment\u3001class \u5207\u6362\uff09\u3001\u8bfb\u5199\u5206\u79bb\uff08\u907f\u514d\u4ea4\u66ff\u8bfb\u5199\u5e03\u5c40\u5c5e\u6027\uff09\u3001transform\/opacity \u8d70\u5408\u6210\u5c42\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">17. \u4ec0\u4e48\u662f\u957f\u4efb\u52a1\uff1f\u600e\u4e48\u5904\u7406\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">&gt; 50ms \u7684\u4efb\u52a1\u3002\u62c6\u5206\uff08\u5207\u7247 + <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">scheduler.yield<\/code>\/setTimeout\uff09\u3001\u79fb\u5165 Web Worker\u3001\u5ef6\u8fdf\u975e\u5173\u952e\u903b\u8f91\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">18. requestIdleCallback \u4e0e requestAnimationFrame \u7684\u5206\u5de5\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">rAF \u5728\u4e0b\u4e00\u5e27\u7ed8\u5236\u524d\u6267\u884c\uff0c\u9002\u5408\u52a8\u753b\uff1brIC \u5728\u7a7a\u95f2\u671f\u6267\u884c\uff0c\u9002\u5408\u4f4e\u4f18\u5148\u7ea7\u4efb\u52a1\uff08\u6709 timeout \u515c\u5e95\uff09\u3002\u52a0\u5206\u70b9\uff1a\u77e5\u9053 Safari \u957f\u671f\u4e0d\u652f\u6301 rIC\uff0c\u53ef\u7528 scheduler API \u66ff\u4ee3\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">19. \u865a\u62df\u5217\u8868\u7684\u539f\u7406\u4e0e\u8fb9\u754c\u60c5\u51b5\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u53ea\u6e32\u67d3\u53ef\u89c6\u533a + \u7f13\u51b2\u533a\uff0c\u7528\u603b\u9ad8\u5ea6\u5360\u4f4d + transform \u504f\u79fb\u3002\u8fb9\u754c\uff1a\u4e0d\u5b9a\u9ad8\uff08\u9700\u6d4b\u91cf\u6216\u9884\u4f30\u6821\u6b63\uff09\u3001\u5feb\u901f\u6eda\u52a8\u767d\u5c4f\uff08\u52a0\u5927\u7f13\u51b2\uff09\u3001\u641c\u7d22\u5b9a\u4f4d\uff08\u8981\u7d22\u5f15\uff09\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">20. \u9632\u6296\u4e0e\u8282\u6d41\u7684\u9009\u62e9\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9632\u6296\u5408\u5e76\u505c\u6b62\u540e\u7684\u6700\u540e\u4e00\u6b21\uff08\u641c\u7d22\u8f93\u5165\uff09\uff0c\u8282\u6d41\u56fa\u5b9a\u9891\u7387\u6267\u884c\uff08\u6eda\u52a8\u3001\u62d6\u62fd\uff09\u3002\u52a0\u5206\u70b9\uff1a\u80fd\u8bf4\u51fa\u4e24\u8005\u5728\u300c\u9996\u89e6\u7acb\u5373\u6267\u884c\u300d\u53d8\u4f53\u4e0a\u7684\u5b9e\u73b0\u5dee\u5f02\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">21. JS \u5185\u5b58\u6cc4\u6f0f\u7684\u5e38\u89c1\u6765\u6e90\u4e0e\u6392\u67e5\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u672a\u6e05\u7406\u7684\u5b9a\u65f6\u5668\/\u76d1\u542c\u5668\u3001\u95ed\u5305\u6301\u6709\u5927\u5bf9\u8c61\u3001\u8131\u79bb DOM \u7684\u5f15\u7528\u3001\u65e0\u9650\u589e\u957f\u7684\u7f13\u5b58\u3002\u6392\u67e5\u7528 DevTools Memory \u7684\u5806\u5feb\u7167\u5bf9\u6bd4\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">22. Web Worker \u7684\u9002\u7528\u4e0e\u4e0d\u9002\u7528\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u9002\u7528\uff1a\u7eaf\u8ba1\u7b97\uff08\u89e3\u6790\u3001\u52a0\u89e3\u5bc6\u3001\u5927\u6570\u636e\u5904\u7406\uff09\u3002\u4e0d\u9002\u7528\uff1aDOM \u64cd\u4f5c\u3001\u9700\u8981\u9891\u7e41\u4e0e\u4e3b\u7ebf\u7a0b\u540c\u6b65\u5c0f\u6570\u636e\u7684\u573a\u666f\uff08\u901a\u4fe1\u5f00\u9500\u53cd\u566c\u6536\u76ca\uff09\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">23. \u5982\u4f55\u4f18\u5316 INP\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5b9a\u4f4d\u6700\u5dee\u4ea4\u4e92 \u2192 \u770b\u4e8b\u4ef6\u5904\u7406\u5668\u662f\u5426\u540c\u6b65\u505a\u91cd\u6d3b \u2192 \u62c6\u5206\/\u5ef6\u8fdf\u975e\u5173\u952e\u66f4\u65b0 \u2192 \u8f93\u5165\u540e\u5148\u505a\u89c6\u89c9\u53cd\u9988\uff08\u5982 optimism UI\uff09\u518d\u5f02\u6b65\u5b8c\u6210\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">24. \u5b57\u4f53\u52a0\u8f7d\u95ea\u70c1\uff08FOUT\/FOIT\uff09\u600e\u4e48\u5904\u7406\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">font-display: swap<\/code> + \u5b57\u4f53\u5b50\u96c6\u5316 + preload\uff1b\u5bf9\u54c1\u724c\u5b57\u4f53\u53ef\u63a5\u53d7 swap\uff0c\u6b63\u6587\u7528\u7cfb\u7edf\u5b57\u4f53\u6808\u515c\u5e95\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">25. CSS \u600e\u4e48\u9632 CLS\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5a92\u4f53\u5143\u7d20\u9884\u8bbe\u5bbd\u9ad8\uff08aspect-ratio\uff09\u3001\u52a8\u6001\u5185\u5bb9\u9884\u7559\u7a7a\u95f4\u3001\u907f\u514d\u5728\u9996\u5c4f\u4e0a\u65b9\u63d2\u5165\u5185\u5bb9\u3001\u5b57\u4f53\u7528 size-adjust \u5339\u914d\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #3ecf8e;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-4\">\u56db\u3001\u5de5\u7a0b\u4e0e\u6743\u8861\uff085 \u95ee\uff09<\/h2>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">26. \u4ee3\u7801\u5206\u5272\u7684\u7c92\u5ea6\u600e\u4e48\u5b9a\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8def\u7531\u7ea7\u5fc5\u62c6\uff0c\u7ec4\u4ef6\u7ea7\u6309\u300c\u5171\u4eab\u5ea6 \u00d7 \u4f53\u79ef\u300d\u62c6\uff1a\u5171\u4eab\u9ad8\u4f53\u79ef\u5927\u7684\u62c6\uff0c\u79c1\u6709\u5c0f\u7ec4\u4ef6\u4e0d\u62c6\uff08\u907f\u514d\u8bf7\u6c42\u788e\u7247\u5316\uff09\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">27. tree shaking \u5931\u6548\u7684\u5e38\u89c1\u539f\u56e0\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">sideEffects \u672a\u914d\u7f6e\u3001CommonJS \u6df7\u7528\u3001\u52a8\u6001\u8bbf\u95ee\u5c5e\u6027\u3001babel \u8f6c\u8bd1\u7834\u574f ESM \u8bed\u6cd5\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">28. \u6027\u80fd\u9884\u7b97\u600e\u4e48\u843d\u5730\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u91cf\u5316\u4e3a\u786c\u6307\u6807\uff08JS \u2264 200KB gzip\u3001LCP \u2264 2.5s\uff09\uff0c\u5199\u8fdb CI \u95e8\u7981\u4e0e bundle \u5206\u6790\u6bd4\u5bf9\uff0c\u8d85\u9884\u7b97\u963b\u65ad\u5408\u5e76\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">29. \u9996\u5c4f\u4f18\u5316\u5df2\u5230\u6781\u9650\uff0c\u8fd8\u5dee 300ms\uff0c\u53bb\u54ea\u627e\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u6309\u94fe\u8def\u6392\u67e5\uff1aTTFB\uff08\u8fb9\u7f18\u7f13\u5b58\/SSR \u6d41\u5f0f\uff09\u3001\u5173\u952e\u8d44\u6e90\u6570\uff08\u5185\u8054\u5408\u5e76\uff09\u3001\u6e32\u67d3\u963b\u585e\uff08CSS \u62c6\u5206\uff09\u3001\u63a5\u53e3\u7011\u5e03\uff08\u9884\u53d6\u5e76\u884c\uff09\u3002\u52a0\u5206\u70b9\uff1a\u5148\u770b p75 \u5206\u5e03\u5b9a\u4f4d\u662f\u300c\u666e\u904d\u6162\u300d\u8fd8\u662f\u300c\u5c3e\u90e8\u6162\u300d\uff0c\u7b56\u7565\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #3ecf8e40\">30. \u4f18\u5316\u4e0e\u53ef\u7ef4\u62a4\u6027\u51b2\u7a81\u65f6\u600e\u4e48\u51b3\u7b56\uff1f<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u7528\u6570\u636e\u8bf4\u8bdd\uff1a\u9884\u4f30\u6536\u76ca\uff08\u5f71\u54cd\u591a\u5c11 p75 \u7528\u6237\uff09\u00d7 \u5b9e\u73b0\u6210\u672c \u00d7 \u7ef4\u62a4\u6210\u672c\uff0c\u6536\u76ca\u5927\u7684\u5148\u505a\uff1b\u300c\u611f\u89c9\u4f1a\u5feb\u300d\u7684\u4f18\u5316\u9ed8\u8ba4\u4e0d\u505a\u3002\u8fd9\u4e00\u95ee\u8003\u5bdf\u7684\u662f\u5de5\u7a0b\u5224\u65ad\u529b\uff0c\u6ca1\u6709\u6807\u51c6\u7b54\u6848\u3002<\/p>\n<div style=\"margin:42px 0 0;padding:22px 0 0;border-top:1px solid #eaeef4\">\n<div style=\"font-size:13px;color:#93a1b5;letter-spacing:1px;margin-bottom:12px\">\u6807\u7b7e<\/div>\n<p><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u524d\u7aef\u9762\u8bd5<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u6027\u80fd\u4f18\u5316<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#Web Vitals<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u9762\u8bd5\u9898<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6309\u9762\u8bd5\u5b98\u771f\u5b9e\u8ffd\u95ee\u8def\u5f84\u7ec4\u7ec7\u7684 30 \u95ee\uff1a\u6307\u6807\u4e0e\u53e3\u5f84\u3001\u52a0\u8f7d\u4f18\u5316\u3001\u6e32\u67d3\u4e0e\u6267\u884c\u3001\u5de5\u7a0b\u4e0e\u6743\u8861\u56db\u4e2a\u677f\u5757\uff0c\u6bcf\u95ee\u7ed9\u51fa\u7b54\u9898\u9aa8\u67b6\u4e0e\u52a0\u5206\u70b9\uff0c\u8986\u76d6 LCP\/INP\/CLS\u3001\u7f13\u5b58\u7b56\u7565\u3001\u957f\u4efb\u52a1\u3001\u865a\u62df\u5217\u8868\u4e0e\u6027\u80fd\u95e8\u7981\u3002<\/p>\n","protected":false},"author":1,"featured_media":296,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,11],"tags":[136,168,35,169],"class_list":["post-298","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frontend-question-bank","category-question-bank","tag-web-vitals","tag-168","tag-35","tag-169"],"_links":{"self":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":0,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media\/296"}],"wp:attachment":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}