Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 = "";
 
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
Posted 12-Sep-12 18:58pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 310
1 Sergey Alexandrovich Kryukov 176
2 PhilLenoir 164
3 Magic Wonder 162
4 Gihan Liyanage 119
0 Sergey Alexandrovich Kryukov 6,140
1 OriginalGriff 5,195
2 CPallini 2,473
3 Richard MacCutchan 1,607
4 Abhinav S 1,505


Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 23 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100