Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is AJAX a heavy framework?

11 views
Skip to first unread message

Mike

unread,
Oct 15, 2006, 5:11:41 AM10/15/06
to
Hi
I've read about AJAX and is fairly impressed by what it can do for me, and
I'm considering using it. However i've heard that using the AJAX framework
slows the loadtime of the site because the framework is rather heavy. Is
there any thuth to this?

Thanx
Mike


xzzy

unread,
Nov 6, 2006, 10:05:43 AM11/6/06
to
see:

http://ajaxpatterns.org/Whats_Ajax%3F#Downsides_of_Ajax.3F


"Mike" <n...@spam.dk> wrote in message
news:4531fb49$0$144$157c...@dreader2.cybercity.dk...

Angel

unread,
Jun 29, 2022, 9:01:24 AM6/29/22
to
What do you mean by that ?

The way I see it, it is not heavy at all.

**********************************************************************
Javascript's built in ajax handling:

var objXMLHttpRequest = new XMLHttpRequest();
objXMLHttpRequest.onreadystatechange = function() {
if(objXMLHttpRequest.readyState === 4) {
if(objXMLHttpRequest.status === 200) {
alert(objXMLHttpRequest.responseText);
} else {
alert('Error Code: ' + objXMLHttpRequest.status);
alert('Error Message: ' + objXMLHttpRequest.statusText);
}
}
}
objXMLHttpRequest.open('GET', 'request_ajax_data.php');
objXMLHttpRequest.send();
************************************************************************

If You use Jquery library ajax, then this will be slower, because Jquery is about 50KB.

***********************************************************************************
Jquery ajax:

$.ajax(
'request_ajax_data.php',
{
success: function(data) {
alert('AJAX call was successful!');
alert('Data from the server' + data);
},
error: function() {
alert('There was some error performing the AJAX call!');
}
}
);
************************************************************************************


*******************************
Angel

Denodster

unread,
Dec 17, 2023, 8:30:18 PM12/17/23
to
In article <950cbe2e-732a-424a...@googlegroups.com>, Angel
<he120...@gmail.com> wrote:

> What do you mean by that ?
>
> The way I see it, it is not heavy at all.
>
> If You use Jquery library ajax, then this will be slower, because Jquery is=
> about 50KB.
>
>
> *******************************
> Angel
>
>
> Mike kirjutas P=C3=BChap=C3=A4ev, 15. oktoober 2006 kl 11:11:41 UTC+2:
> > Hi
> > I've read about AJAX and is fairly impressed by what it can do for me, an=
> d=20
> > I'm considering using it. However i've heard that using the AJAX framewor=
> k=20
> > slows the loadtime of the site because the framework is rather heavy. Is=
> =20
> > there any thuth to this?
> > Thanx
> > Mike

Most browsers support fetch() these days.

/******/
fetch("http://example.com").then((response) => {
return response.json()
}).then((jsonObject) => {
//do things with jsonObject
}
/******/
0 new messages