First off if you don’t know what jQuery is by now then this post probably won’t make a lot of sense to you, so in that case visit jQuery’s website and get back to me when your a web 2.0 expert.

It was just announced that Microsoft is going to host their MS Ajax javascript libraries and jQuery libraries for you on their CDN servers.  Check out Scott Gu’s post on the matter but to make a long story short, MS has “strategically” placed servers all over the world that will serve up the MS Ajax and jQuery libraries for you.  All you have to do is include your <script src=”{insert js library favorite flavor}.js”> in your HTML and have it point to the appropriate JS file on Microsoft’s CDN server(s).  Check out all the versions it supports on the Asp.Net AJAX CDN site.

This is obviously pretty cool because chances are Microsoft’s servers will have better uptime than your own so you can pretty much rely on that JS file always being there.  In addition, its free for anyone to use, commercial or non-commercial.

You may be thinking to yourself “wow, that’s so cool of Microsoft, they are really thinking of the little guy!”, which isn’t a COMPLETELY wrong statement, but did you know that Google has been doing the same thing for quite awhile now?

If you check out jQuery’s website, the jQuery authors themselves even recommend grabbing jQuery from google’s site, check out How jQuery works and look at the “Complete Example” section near the top.

Also, if your interested, have a look at Google’s page and see what other js libs they host for you (hint: jQuery, Prototype, Yahoo YUI, Dojo, script.aculo.us).

So, how do I leverage either the MS or Google CDN for my jQuery js files?  Simple! see below

Google: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
 
or
 
MS: <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

*** If your asking yourself what is the difference between “jquery.min.js” and “jquery.js” the answer is that the “min” means that the js file is compressed meaning it has whitespace removed, making it significantly smaller resulting in less download size for your users which results in your sites faster page loads.

 

Great! Now your going to go and change all your <script> tags in all your projects to use either the MS or Google CDN version of jQuery, right?!?!?!?!  Now hold up there partner!! Take a step back and think about this and what it means to your app and where your app lives.

Ask yourself these questions:

Is your app on the internet?

Then I would say you should probably be using of the two CDN’s for your jQuery libraries because your app is internet facing and the js files will be served up quicker to your users and your pages will load faster.

Is your app an intranet app?

Then take a step back and think this one out logically.  What server is going to serve up the jQuery libraries faster?  Google? No!  Microsoft? No!  A server on the intranet? BINGO!  A server on your intranet more than likely serve up the js files a hell of a lot faster than a users PC having to call out to Google or MS to get the js files.  (Yes, a caching server may help matters)

For all you SharePoint junkies out there like me the two questions above are VERY relevant.  Chances are the majority of SharePoint sites your working on are going to be intranet facing sites and therefore your still better off hosting the js libraries yourself.  BUT, if your working on a SharePoint INTERNET facing site, then one of these CDN’s should be something you seriously consider because SharePoint takes long enough to load a page so any increase in page load times you can make will go a long way.

Moral of the story time.  Take a second and think to yourself before just reading a post out on the interwebs and implementing it.  Think about the effects it will have on your app and be sure to take into account YOUR environment.


Posted in:   Tags:

Comments


September 30. 2009 00:12
Christina
I am not a SharePoint junkie but my brother is exploring various Sharepoint sites. I will tell him about this because I knew that this can help him. Thanks Tony!

http://www.moogio.se/http://www.moogio.se/


September 30. 2009 18:14
data recovery software
Nice Info !!

http://www.stellarinfo.com/http://www.stellarinfo.com/


October 8. 2009 02:10
Abrahamsen
Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content.  For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster – which makes your pages load quicker).  

http://abrahamsen.lifestylebloggo.de/http://abrahamsen.lifestylebloggo.de/


October 14. 2009 09:50
Work at Home Jobs
Thank you very much for the information. Can't say I know much about stuff like this but I do try to keep updated on the "techie" side of things so I can apply anything needed to my <a href="work-at-home-based-business.com">work from home</a> sites.

http://work-at-home-based-business.com/http://work-at-home-based-business.com/


October 15. 2009 04:08
Cialis
Hello Tony!, You have done a great job by exploring this subject in such depth!

http://www.buy-specialist.com/http://www.buy-specialist.com/


October 18. 2009 05:07
Equity Indexed Annuities
That's awesome. Really very cool work. All great information.

http://www.freeannuityrates.com/annuities/index/index-annuity-guide.phphttp://www.freeannuityrates.com/annuities/index/index-annuity-guide.php


November 2. 2009 21:21
arnold libman
Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that: Thanks for lunch!

http://www.arnoldlibman.com/http://www.arnoldlibman.com/


November 3. 2009 12:05
Chinese pregnancy calendar
There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

http://www.baby-gender-predictor.net/chinese-pregnancy-calendarhttp://www.baby-gender-predictor.net/chinese-pregnancy-calendar


November 5. 2009 01:32
the best organic skin care products
I am not really sure if best practices have emerged around things like that, but I am sure that your great job is clearly identified. I was wondering if you offer any subscription to your RSS feeds as I would be very interested and can?t find any link to

http://skincloze.com/http://skincloze.com/


November 5. 2009 02:01
how can you prevent diabetes
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.

http://diabetesec.com/http://diabetesec.com/


November 6. 2009 22:49
Naples city breaks
Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

http://www.travelsoon.com/naples-city-breaks.htmlhttp://www.travelsoon.com/naples-city-breaks.html


November 7. 2009 02:17
kelowna real estate
Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

http://www.okhomeseller.com/http://www.okhomeseller.com/


November 7. 2009 03:06
bowflex revolution
Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

http://www.bowflex-review.com/Bowflex_Revolution.htmlhttp://www.bowflex-review.com/Bowflex_Revolution.html


November 7. 2009 03:17
kelowna real estate
Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

http://www.okhomeseller.com/http://www.okhomeseller.com/


November 15. 2009 20:28
http://www.mejores-casinos.es/
I completely agree with the above comment, the internet is with a doubt growing into the most important medium of communication across the globe and its due to sites like this that ideas are spreading so quickly.

http://www.mejores-casinos.es/http://www.mejores-casinos.es/


November 16. 2009 20:34
Home loan
Nice post.I like the way you start and then conclude your thoughts. Thanks for this information .I really appreciate your work, keep it up

http://www.ratedetective.com.au/home-loanshttp://www.ratedetective.com.au/home-loans


November 16. 2009 22:43
Austin spinal cord injury lawyer
That's really good step taken by Microsoft as its uptime will be high than ours own so JS files must be put there. Thanks

http://www.bestspinal-cordinjurylawyers.com/http://www.bestspinal-cordinjurylawyers.com/


February 1. 2010 08:10
Loans in LA
Leadership is practiced not so much in words as in attitude and in actions.

http://superpaydayloan.com/state/Louisianahttp://superpaydayloan.com/state/Louisiana


February 9. 2010 02:56
fast payday loans
What is once well done is done forever.

http://fastloansus.com/http://fastloansus.com/


February 12. 2010 21:54
schedule software
Very informative. Thank you for sharing it I am so impressed w/evernote so far. really pro stuff. thx folks

http://www.appointment-plus.com/http://www.appointment-plus.com/


February 14. 2010 08:39
make money on the internet
I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon

http://www.goarticles.com/cgi-bin/showa.cgi?C=2452612http://www.goarticles.com/cgi-bin/showa.cgi?C=2452612


February 14. 2010 08:40
cash gifting
i forgot to say very interesting and I would like learn more.

http://www.goarticles.com/cgi-bin/showa.cgi?C=2452612http://www.goarticles.com/cgi-bin/showa.cgi?C=2452612

Search Blog

Blog Roll

    OPMLDownload OPML file

    Recent Comments

    Banners

    Theme Grabber
    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010 Tony Testa's World