本文介绍了Yslow替代品-小型网站的优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于小型Intranet的Web应用程序.我安装了YSlow,它表明我做了几件事,但它们似乎与我无关.例如,我不需要CDN.我的应用程序运行缓慢,因此我想减少请求的带宽.

I am developing a small intranet based web application. I have YSlow installed and it suggests I do several things but they don't seem relevant for me.e.g I do not need a CDN. My application is slow so I want to reduce the bandwidth of requests.

  1. 我应该遵守YSlow的哪些规则?
  2. 是否有用于较小网站的替代工具?
  3. 在推出我的申请之前,我应该申请的检查清单是什么?

我正在使用ASP.net.

I am using ASP.net.

推荐答案

Intranet站点上的带宽根本不应该成为问题(除非您有VPN用户,否则).如果您不这样做,并且它仍在爬行,则可能与后端有关而不是与前端结构有关.

Bandwidth on intranet sites shouldn't be an issue at all (unless you have VPN users, that is). If you don't and it's still crawling, it's probably something to do with the backend than the front-facing structure.

如果您要针对远程用户进行优化,则可以使用某些相同的方法来尝试对整个用户进行优化:

If you are trying to optimise for remote users, some of the same things apply to try and optimise the whole thing:

  • 不要使用30个样式表-将它们组合成一个样式
  • 不要使用30个JS文件,将它们归为一个
  • 考虑使用压缩器或YUI压缩器压缩JS和CSS.
  • 考虑使用sprite(具有多个版本的图像,例如-向上按钮和向下按钮,一个在另一个之上)
  • 显然,海量图像是不可以的
  • 确保您发送的expires标头可以确保样式表/js/images/etc都缓存了合理的时间.
  • 确保您的页面没有很大.如果您处于受控环境中,并且可以保证JS的可用性,则可能需要使用AJAX来分页数据.

这篇关于Yslow替代品-小型网站的优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 23:08