Click here to Skip to main content
Rate this: bad
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");
	/* Create the object using other browser's method */
	request_o = new XMLHttpRequest();
return request_o; //return the object
http.onreadystatechange = getAjaxResponse;
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 19:58pm

1 solution

Rate this: bad
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...

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

  Print Answers RSS
0 DamithSL 285
1 Zoltán Zörgő 170
2 OriginalGriff 140
3 BillWoodruff 125
4 Sergey Alexandrovich Kryukov 120
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539

Advertise | Privacy | Mobile
Web01 | 2.8.141223.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