且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何降低ASP.NET应用程序的页面加载时间?

更新时间:2023-11-19 23:00:52

从一些的TechEd 2010北美的主要外卖的:


  • 缓存是关键的性能,非常仔细地考虑你的缓存​​策略。

  • 禁用ViewState中如果可能的话。

  • 设置<编译调试=false的方式>在部署应用程序时,在web.config中

  • 考虑CDN的或子域图形和其它静态内容。

  • 将JavaScript的页面的底部,CSS在顶部。

  • 考虑对图标和其他小的图形CSS精灵。

您可以在网上观看这里的会议,他们都强烈建议:

How to decrease the page load time in ASP.NET application? What should be the precautions and specially when we are interacting with databases

e.g.

  1. wise use of viewstate
  2. Set in web.config when deploying the app

    etc

Some of the key "take-aways" from TechEd 2010 North America:

  • Caching is key to performance, consider your caching strategy very carefully.
  • Disable viewstate if possible.
  • Set <compilation debug="false"> in web.config when deploying the app.
  • Consider CDN's or subdomains for graphics and other static content.
  • Place javascript at the bottom of the page, CSS at the top.
  • Consider CSS sprites for icons and other "small" graphics.

You can watch the sessions online here, they're both highly recommended: