tags:

views:

436

answers:

6

I am planning to use jQuery in my new website.

I have some questions about jQuery:

  1. if I am using jQuery in my site, will page load slower than a normal js.
  2. our project is a social network site. is jQuery suitable for it?

Please, give me your suggestions.

+4  A: 
  1. It will not be slower compared to normal js. In some cases it will be faster.
  2. Yes.
bingle
+2  A: 

If you're worried about the load times of your site, you could use a Content Distribution Network for loading jQuery.

I recommend you the Google AJAX Libs CDN, it's used by many, many sites.

If you're looking for high performance optimization in your website , try YSlow, it will analyze your pages, and will tell you what actions to take to reduce page load times.

CMS
+4  A: 

JQuery minified is about 19 KBs. If you link to Google-JS you can be assured that people won't have to download JS from your website again and again if they're Google users (who isn't?)

JQuery is suitable for anywhere where you need Javascript.

Cyril Gupta
I downvoted this questions because the fact that you are a Google user has nothing to do with the fact that you cached or not their hosted copy of jQuery. You will simply have it cached if you previously visited a site using it.
Mathieu Pagé
+3  A: 
  1. There will be some overhead as users will need to download the jQuery js file. This file compresses down to around ~20K (gzipped), however, so the impact is minimal.

  2. jQuery is suitable for any kind of website.

One further point: using a solid javascript library like jQuery will drastically reduce the amount of time it requires to develop client-side behavior. jQuery takes a lot of the pain out of coding for the incompatibilities and quirks between IE, Firefox and Safari. I would absolutely recommend using it.

bigmattyh
A: 

use jquery / other script wisely.

just load the plugin that you need on that page, if possible compress the jquery and its plugin (gzip) so your page will load faster.

be aware of error, with javascript when they got error, all the page will be on error as well :(

A: 

if you don't use jQuery, it's quite likely you will probably write raw javascript support that is just as many lines of code. Plus you will pull your hair out solving all the cross-browser idiosyncrasies that jQuery takes care of for you relatively transparently and painlessly.

Some candidates frameworks for your social network platform, like - for example, Drupal - include jQuery in their core distribution anyway...

Scott Evernden