Current time: 07-29-2014, 10:43 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google Ajax library for serving jQuery?
04-10-2012, 01:15 PM
Post: #1
Google Ajax library for serving jQuery?
I read recently that cloudflare also offers a version of their cdn for jQuery called cdnjs.com -

Anybody have any experience with using these for increasing optimization?

This is a nice article on it: http://encosia.com/3-reasons-why-you-sho...y-for-you/
Find all posts by this user
Quote this message in a reply
04-11-2012, 12:47 AM
Post: #2
RE: Google Ajax library for serving jQuery?
I used google cdn for jquery hosting (thought that most of the users will hit the file from cache),
After couple of tests, i figure out that if i will combine all the js files on my website and host the file on my webserver, it will be faster then google.

But, this is probably because google don't have cdn pop in Israel.
Find all posts by this user
Quote this message in a reply
04-11-2012, 02:27 AM
Post: #3
RE: Google Ajax library for serving jQuery?
I pinged them from my server (London) and google was about 1ms faster, and from home (Ireland) google was three times faster. So maybe it will depend on your location as to whether it is better.
But also remember its new so not many website would be using it, so better stick with google where you get the benefit of cached libraries, until it is more widespread.
Find all posts by this user
Quote this message in a reply
04-11-2012, 03:11 AM
Post: #4
RE: Google Ajax library for serving jQuery?
Not if you have 70% of returning visitors, and you have combined all your js files into one (cached) file.
Find all posts by this user
Quote this message in a reply
04-11-2012, 03:23 AM
Post: #5
RE: Google Ajax library for serving jQuery?
(04-11-2012 03:11 AM)Avi Keinan Wrote:  Not if you have 70% of returning visitors, and you have combined all your js files into one (cached) file.

Well then that has nothing to do with using a cdn for the libraries.
Find all posts by this user
Quote this message in a reply
04-12-2012, 04:04 AM
Post: #6
RE: Google Ajax library for serving jQuery?
(04-11-2012 02:27 AM)fritzelly Wrote:  I pinged them from my server (London) and google was about 1ms faster, and from home (Ireland) google was three times faster. So maybe it will depend on your location as to whether it is better.
But also remember its new so not many website would be using it, so better stick with google where you get the benefit of cached libraries, until it is more widespread.

It's not just the ping time is it though...

There's the time to resolve the DNS and make a new connection - I've seen a couple of cases where a site might be better serving jQuery from it's own domain rather than Google...

But a couple of samples really isn't enough to make an informed decision.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-12-2012, 05:21 AM
Post: #7
RE: Google Ajax library for serving jQuery?
You have to treat your visitors like they are comming to your site first with a primed cache(empty)
If you really care about speed, then you will make sure to load your JS after onload.
Find all posts by this user
Quote this message in a reply
04-20-2012, 04:03 AM
Post: #8
RE: Google Ajax library for serving jQuery?
Also, you need to remember that javascript blocks page render, so any delay in dns lookup/connect time/ttfb/or even crash (yes, google is not god, it can crash), will delay your page loading.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)