分享 前端性能优化指导

huacnlee · March 14, 2013 · Last by HungYuHei replied at March 14, 2013 · 3239 hits

http://browserdiet.com/

  • avoid inline code
  • styles up top, scripts down bottom
  • minify your html
  • try out async and defer
  • minify your stylesheets
  • combining multiple css files
  • prefer over @import
  • think about (and rethink) your key selector
  • load 3rd party content asynchronously
  • cache array lengths
  • avoid document.write
  • minimize repaints and reflows
  • minify your script ....

还有很多

此外可以安装 YSlow 测试是否达标

分析工具还有 Google PageSpeed,跟 YSlow 类似

You need to Sign in before reply, if you don't have an account, please Sign up first.