Ridhima Sharma
Ridhima Sharma

Reputation: 31

jQuery- Minimum Browser memory requirements

We're using jQuery version 1.6 for an AJAX-based web app. I'm researching for the minimum memory required by different browsers (primarily IE, Firefox, Chrome and Safari) to render jQuery powered pages. I tried to search on Google and even docs.jquery.com but couldn't find any answer. Any help or pointers will be appreciated.

Thanks, Ridhima

Upvotes: 3

Views: 520

Answers (2)

Marcelo Assis
Marcelo Assis

Reputation: 5194

The memory consumption by Jquery itself is not a big a problem. You have just to create a code which doesn't implies a big amount of processing, and there's nothing to fear.

I have built websites using a lot of Jquery which run smoothly even in "old" android phones.


A tip:

One of the things you should avoid, is assigning events to big number of elements. I worked in a project which I had a really big list of elements(more than 500) in a table, and I assigned click functions using something like this:

$('.trClass').click(function() {
  $(this).find('.someButtonClass:first').click(...)
});

Have always in mind, what your code really does inside it's libraries functions. In that snippet, I was "foreaching" each one of my 500 TRs elements, and in each loop, searching for some button class and assigning it an event. The page was taken more than 5 seconds (frozen) to render completely.

I solved this problem adding an "onClick=Javascript:functionName()" manually(in "compile time") on each of the clickable elements.

Upvotes: 1

Brian Hoover
Brian Hoover

Reputation: 7991

jQuery itself isn't a huge memory hog. I've got an old 2.2 GHz P4 machine with 1 GB of RAM and jQuery sites run just fine.

Upvotes: 0

Related Questions