ASP.NET:如何更快的加载页面 [英] ASP.NET: how to load page faster

查看:94
本文介绍了ASP.NET:如何更快的加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们写了门户网站与ASP.NET。但它有很多的Javascript和我们的页面加载缓慢。
在某些页面,页面大小是多少1.5 MB!
什么是减少或COM preSS页面大小,使其更快的最佳方式?
谢谢

We wrote Portal with ASP.NET. But it has many Javascripts and our pages loading slow. In some page , page size is amount 1.5 mb! What is the best way to reduce or compress page size to make it faster? Thanks

推荐答案

几件事情:


  1. 最小化您的JavaScript和CSS文件。 谷歌有JS一个很好的极小

  2. 缓存图片,js文件和css文件。如何从IIS,<一个做到这一点的信息href=\"http://stackoverflow.com/questions/7541032/caching-specific-javascript-and-css-files/7542816#7542816\">here.

  3. 禁用ViewState的如果你能或者至少使其只在需要的控件。

  4. 在IIS中使用COM pression

  5. 使用内容分发网络(CDN)来提供JavaScript库,如jQuery的,等等。

  6. 使用
  7. 优化图像 Smush.it

  8. 将JavaScript的code。在页面的底部,这样的页面渲染开始更快

  9. 如果您使用JSON的UI和后端之间的数据交换,请确保您的COM preSS这一点。

  10. 使用雪碧我创建精灵为你的图像图标,背景等。

  1. Minimize your javascript and CSS files. Google has a nice minimizer for JS.
  2. Cache images, js files and css files. Info on how to do this from IIS, here.
  3. Disable ViewState if you can or at least enable it only on the controls that need it.
  4. Use compression on IIS
  5. Use a content delivery network (CDN) to deliver javascript libraries such as jQuery, etc.
  6. Optimize your images using Smush.it
  7. Put javascript code at the bottom of the page so that the page starts rendering faster
  8. If you use JSON for data interchange between the UI and the backend, make sure you compress it, too.
  9. Use sprite me to create sprites for your image icons, backgrounds, etc.

这篇关于ASP.NET:如何更快的加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆