Click here to Skip to main content
13,086,019 members (82,043 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 18: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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 23 Sep 2012
Copyright © CodeProject, 1999-2017
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