Title: 前端性能优化 · Issue #152 · sisterAn/JavaScript-Algorithms · GitHub
Open Graph Title: 前端性能优化 · Issue #152 · sisterAn/JavaScript-Algorithms
X Title: 前端性能优化 · Issue #152 · sisterAn/JavaScript-Algorithms
Description: 这里引用一下 雅虎军规 : 尽量减少 HTTP 请求个数——须权衡 使用 CDN(内容分发网络) 为文件头指定 Expires 或 Cache-Control ,使内容具有缓存性。 避免空的 src 和 href 使用 gzip 压缩内容 把 CSS 放到顶部 把 JS 放到底部 避免使用 CSS 表达式 将 CSS 和 JS 放到外部文件中 减少 DNS 查找次数 精简 CSS 和 JS 避免跳转 剔除重复的 JS 和 CSS 配置 ETags 使 AJAX 可缓存 ...
Open Graph Description: 这里引用一下 雅虎军规 : 尽量减少 HTTP 请求个数——须权衡 使用 CDN(内容分发网络) 为文件头指定 Expires 或 Cache-Control ,使内容具有缓存性。 避免空的 src 和 href 使用 gzip 压缩内容 把 CSS 放到顶部 把 JS 放到底部 避免使用 CSS 表达式 将 CSS 和 JS 放到外部文件中 减少 DNS 查找次数 精简 CSS 和 JS ...
X Description: 这里引用一下 雅虎军规 : 尽量减少 HTTP 请求个数——须权衡 使用 CDN(内容分发网络) 为文件头指定 Expires 或 Cache-Control ,使内容具有缓存性。 避免空的 src 和 href 使用 gzip 压缩内容 把 CSS 放到顶部 把 JS 放到底部 避免使用 CSS 表达式 将 CSS 和 JS 放到外部文件中 减少 DNS 查找次数 精简 CSS 和 JS ...
Opengraph URL: https://github.com/sisterAn/JavaScript-Algorithms/issues/152
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"前端性能优化","articleBody":"这里引用一下 **雅虎军规** :\r\n1. 尽量减少 HTTP 请求个数——须权衡\r\n2. 使用 CDN(内容分发网络)\r\n3. 为文件头指定 Expires 或 Cache-Control ,使内容具有缓存性。\r\n4. 避免空的 src 和 href\r\n5. 使用 gzip 压缩内容\r\n6. 把 CSS 放到顶部\r\n7. 把 JS 放到底部\r\n8. 避免使用 CSS 表达式\r\n9. 将 CSS 和 JS 放到外部文件中\r\n10. 减少 DNS 查找次数\r\n11. 精简 CSS 和 JS\r\n12. 避免跳转\r\n13. 剔除重复的 JS 和 CSS\r\n14. 配置 ETags\r\n15. 使 AJAX 可缓存\r\n16. 尽早刷新输出缓冲\r\n17. 使用 GET 来完成 AJAX 请求\r\n18. 延迟加载\r\n19. 预加载\r\n20. 减少 DOM 元素个数\r\n21. 根据域名划分页面内容\r\n22. 尽量减少 iframe 的个数\r\n23. 避免 404\r\n24. 减少 Cookie 的大小\r\n25. 使用无 cookie 的域\r\n26. 减少 DOM 访问\r\n27. 开发智能事件处理程序\r\n28. 用 代替 @import\r\n29. 避免使用滤镜\r\n30. 优化图像\r\n31. 优化 CSS Spirite\r\n32. 不要在 HTML 中缩放图像——须权衡\r\n33. favicon.ico要小而且可缓存\r\n34. 保持单个内容小于25K\r\n35. 打包组件成复合文本\r\n\r\n更多系列文章:\r\n- [前端性能优化【进阶篇】](https://mp.weixin.qq.com/s/PCmCS46GPc6tt1yb9goNFA)\r\n- [1.5W+字的全链路前端性能优化送给你](https://mp.weixin.qq.com/s/nqUMUoa2R5fIfzJV5kBBsg)\r\n- [从 10 多秒到 1.05 秒!前端性能优化实践](https://mp.weixin.qq.com/s/cHfIXOyOJ5Ig1tE4tmFvAw)","author":{"url":"https://github.com/sisterAn","@type":"Person","name":"sisterAn"},"datePublished":"2021-03-01T00:49:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/152/JavaScript-Algorithms/issues/152"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a700a67-2686-4849-94c7-2c74aa5a2c30 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A70A:ECDF9:9CB3D8:D9544E:696A81CD |
| html-safe-nonce | d2194157963c6918d60e6b705c15e1ba3b801cb736933b9b4a22e69347811323 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzBBOkVDREY5OjlDQjNEODpEOTU0NEU6Njk2QTgxQ0QiLCJ2aXNpdG9yX2lkIjoiMzg4MDEwODI5MzQ1NDcyNTU4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a11ddaa516e58c57d90b3ae8367a68324a0ba85661d57994be2de0ade162c7fb |
| hovercard-subject-tag | issue:818366042 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sisterAn/JavaScript-Algorithms/152/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4fc4a6b061a198b5e4908110c4552497ce1e2eb9d09a5f48a038d2f2d1b0471/sisterAn/JavaScript-Algorithms/issues/152 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4fc4a6b061a198b5e4908110c4552497ce1e2eb9d09a5f48a038d2f2d1b0471/sisterAn/JavaScript-Algorithms/issues/152 |
| og:image:alt | 这里引用一下 雅虎军规 : 尽量减少 HTTP 请求个数——须权衡 使用 CDN(内容分发网络) 为文件头指定 Expires 或 Cache-Control ,使内容具有缓存性。 避免空的 src 和 href 使用 gzip 压缩内容 把 CSS 放到顶部 把 JS 放到底部 避免使用 CSS 表达式 将 CSS 和 JS 放到外部文件中 减少 DNS 查找次数 精简 CSS 和 JS ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sisterAn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 913560fa317c3c5a71e34f9b19253c9f09d02b4b958a86c2a56f4c8541116377 |
| turbo-cache-control | no-preview |
| go-import | github.com/sisterAn/JavaScript-Algorithms git https://github.com/sisterAn/JavaScript-Algorithms.git |
| octolytics-dimension-user_id | 19721451 |
| octolytics-dimension-user_login | sisterAn |
| octolytics-dimension-repository_id | 252061924 |
| octolytics-dimension-repository_nwo | sisterAn/JavaScript-Algorithms |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 252061924 |
| octolytics-dimension-repository_network_root_nwo | sisterAn/JavaScript-Algorithms |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5998c30593994bf2589055aef7b22d368a499367 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width