General Question

Ranimi23's avatar

Why should I use JavaScript Library if it may effect the performance of a web site?

Asked by Ranimi23 (1917points) February 12th, 2011

This is an important question and I can not decide when and why should I use JQuery or another JS Library.

Is is very easy to add JQuery to the project and write short commands. It saves me time to write much code in JS that someone already wrote it for me and checked it is working in all browers.

But cellular or mobile programming is not like that. Each additional file directly affects the performance. My testing with JQuery mobile damaged performence badly due to file size, 17KB.

So the question is whether or not it better to spend a little time to write my own JS suitable for what I need and not working with files ready? When is it better and when it is really not?

Be glad to hear your opinions.

Observing members: 0 Composing members: 0

2 Answers

Vortico's avatar

You might want to check out some extremely lightweight Javascript libraries such as xui, zepto, or jQuery Mobile. However, 17KB should not be a huge concern on iOS and Android devices. On phones with minimal web browsing speed and capabilities, you could launch a separate site at or with minimal CSS, small page size, and no Javascript at all.

wenn's avatar

While iPhone and Android handle richer sites pretty well, ideally you want to have a mobile friendly site that users are redirected to when they visit your site. This can be done with a .htaccess device check and redirect or you can also use @media CSS calls to check device widths and restyle the site for mobile.

If you are really worried about files and file size, i’d make a minimal mobile site, just using CSS, animations/jquery/unneeded files removed in a subdirectory like as @Vortico stated.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther