Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 132153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:13:04+00:00 2026-05-11T06:13:04+00:00

There are a few ways to include jQuery and jQuery UI and I’m wondering

  • 0

There are a few ways to include jQuery and jQuery UI and I’m wondering what people are using?

  • Google JSAPI
  • jQuery’s site
  • your own site/server
  • another CDN

I have recently been using Google JSAPI, but have found that it takes a long time to setup an SSL connection or even only to resolve google.com. I have been using the following for Google:

<script src='https://www.google.com/jsapi'></script> <script> google.load('jquery', '1.3.1'); </script> 

I like the idea of using Google so it’s cached when visiting other sites and to save bandwidth from our server, but if it keeps being the slow portion of the site, I may change the include.

What do you use? Have you had any issues?

Edit: Just visited jQuery’s site and they use the following method:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js'></script> 

Edit2: Here’s how I’ve been including jQuery without any problems for the last year:

<script src='//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js'></script> 

The difference is the removal of http:. By removing this, you don’t need to worry about switching between http and https.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:13:04+00:00Added an answer on May 11, 2026 at 6:13 am

    Without a doubt I choose to have JQuery served by Google API servers. I didn’t go with the jsapi method since I don’t leverage any other Google API’s, however if that ever changed then I would consider it…

    First: The Google api servers are distributed across the world instead of my single server location: Closer servers usually means faster response times for the visitor.

    Second: Many people choose to have JQuery hosted on Google, so when a visitor comes to my site they may already have the JQuery script in their local cache. Pre-cached content usually means faster load times for the visitor.

    Third: My web hosting company charges me for the bandwidth used. No sense consuming 18k per user session if the visitor can get the same file elsewhere.

    I understand that I place a portion of trust on Google to serve the correct script file, and to be online and available. Up to this point I haven’t been disappointed with using Google and will continue this configuration until it makes sense not to.

    One thing worth pointing out… If you have a mixture of secure and insecure pages on your site you might want to dynamically change the Google source to avoid the usual warning you see when loading insecure content in a secure page:

    Here’s what I came up with:

    <script type='text/javascript'>     document.write([         '\<script src='',         ('https:' == document.location.protocol) ? 'https://' : 'http://',         'ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js' type='text/javascript'>\<\/script>'      ].join('')); </script> 

    UPDATE 9/8/2010 – Some suggestions have been made to reduce the complexity of the code by removing the HTTP and HTTPS and simply use the following syntax:

    <script type='text/javascript'>     document.write('\<script src='//ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js' type='text/javascript'>\<\/script>'); </script> 

    In addition you could also change the url to reflect the jQuery major number if you wanted to make sure that the latest Major version of the jQuery libraries were loaded:

    <script type='text/javascript'>     document.write('\<script src='//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'>\<\/script>'); </script> 

    Finally, if you don’t want to use Google and would prefer jQuery you could use the following source path (keep in mind that jQuery doesn’t support SSL connections):

    <script type='text/javascript'>     document.write('\<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'>\<\/script>'); </script> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are a few ways to get class-like behavior in javascript, the most common
I was wondering if there was a way to easily maintain scroll position using
There are a few books about specific ORM products such as Hibernate or Linq
There are a few things that I almost always do when I put a
There are a few questions on SO already regarding LINQ pivots and while a
There are a few questions about configuring Apache for local development, such as this
There are a few APIs for grabbing the address book/contact list from the major
I see there are a few . Which ones are maintained and easy to
I've seen there are a few of them. opencvdotnet , SharperCV , EmguCV ,
I've noticed there are a few solutions to allow the use of memcached on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.