1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Host jquery.js or link to it?

Discussion in 'jQuery' started by Tony Brar, Jul 26, 2012.

  1. #1
    Hi guys,

    I wanted to know, would it be faster to link to my own copy of jquery.js or jquery.com's?

    Thanks in advance,

    -Tony
     
    Solved! View solution.
    Tony Brar, Jul 26, 2012 IP
  2. #2
    dylanj, Jul 26, 2012 IP
  3. nhl4000

    nhl4000 Well-Known Member

    Messages:
    479
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #3
    The article in 3 lines. CDN - Content Delivery Network

    Decreased latency: jQuery will download faster because it is downloaded from the CLOEST available server.
    increased parallelism: Web browsers limit the number of connections that can be made simultaneously to a domain. Using CDN, allows one more connection available for your site to load faster.
    Better caching: The probability of the user already having the jQuery file is quite high since thousands of sites already link to Google's CDN.

    Recommendation: Use Google's CDN.
     
    nhl4000, Aug 7, 2012 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    And, just in case Google is down for a few seconds, I do a fallback to Microsoft, then to my local file.
    
    if (typeof jQuery == "undefined") {
    }
    
    Code (markup):
     
    Rukbat, Aug 10, 2012 IP
  5. Tieutieu22

    Tieutieu22 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    Try JQuery because it should download faster because it is close to the available server. If that doesn't pan out as I've mentioend, try the second option.
     
    Tieutieu22, Mar 8, 2023 IP
  6. phoenixtropicals

    phoenixtropicals AdsP2p.net Peer To Peer Web Advertising Premium Member

    Messages:
    139
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    40
    #6
    Well, you will take some load off your own server if you load from somewhere else.
     
    phoenixtropicals, Sep 3, 2023 IP