网站的性能问题 [英] performance issue for website
本文介绍了网站的性能问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
目前,我正在一个Web项目中,该请求使用http从Java脚本发送请求,示例代码如下
Hi all,
at present i am working on a web project where the request is send from java script using http and the sample code is as following
var request_o;
var browser = navigator.appName; //find the browser name
if(browser == "Microsoft Internet Explorer")
{
/* Create the object using MSIE's method */
request_o = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
/* Create the object using other browser's method */
request_o = new XMLHttpRequest();
}
return request_o; //return the object
http.onreadystatechange = getAjaxResponse;
http.send(null);
boal = "";
如果我们要实现任何新方法,我们正在使用Web服务调用这些方法
我需要知道哪个能提供更好的性能是旧的http或webservices
在此先感谢
if we want any new methods to be implemented we are using webservices to call the methods
i need to know which gives the better performance is the old http or the webservices
thanks in advance
推荐答案
您好,a.pkumar,这总是一个棘手的问题,因为它总是取决于您要发送和接收的内容.您可以尝试使用"Fiddler"之类的工具,查看两种方法的总毫秒数.就个人而言,Web服务路线更干净.您是否考虑过将MVC作为解决方案而不是单独的Web服务?
雅虎还提供了页面性能YSlow,它还会显示一些数字. FireBug还显示请求/响应时间.
希望这会有所帮助...
Hi a.pkumar, this is a tricky one as always it depends on what you are sending and receiving. You could try using a tool like ''Fiddler'' and see the total ms for both approaches. Personally the web service route is cleaner. Have you considered MVC as a solution instead of separate web services?
Yahoo also offers a page perfomance YSlow which would also show you some numbers. FireBug also shows request / response times.
Hope this helps a bit...
这篇关于网站的性能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文