Mobile app version of vmapp.org
Login or Join
Speyer207

: Google JSAPI Auto-Loading When using Google's JSAPI Auto-Loading system - is there a way to get the returned file with all the JavaScript (combined) in one HTTP request? At the minute is just

@Speyer207

Posted in: #Google #Javascript

When using Google's JSAPI Auto-Loading system - is there a way to get the returned file with all the JavaScript (combined) in one HTTP request?

At the minute is just calls the load routines (with more HTTP requests) at the end of returned file, which makes it less than ideal when it can reduce 2+ requests by just including the returned JavaScript content all in one.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

I have personally stopped using Google's auto loading because of the additional request and I've found very few other benefits. Instead I just include the JS and files directly. You can find the tags at this site.

Here is the code I use for jQuery:

<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/blitzer/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/i18n/jquery-ui-i18n.min.js"></script>


It's nice of Google to also include the jQuery UI CSS as well as the referenced images.

10% popularity Vote Up Vote Down


 

@Dunderdale272

No. The AutoLoading option seems more about decreasing the number of requests you have to make to the Google service, rather than about decreasing the number of returned scripts and files from Google.

I don't see an option to concatenate the returned files as of this writing (16 July 2010).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme