Results 1 to 6 of 6
Threaded View
-
11th Oct 2009, 02:11 PM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comStart using Google CDN for your javasripts !
For those who are using Jquery/MooTools/script.aculo.us etc, you can use google to load your frameworks with ease, the benifits of using the CDN is
- Less bandwidth
- Faster loading
- 1 Javascript call
What the CDN Does is provide you with a framework you can use to load all your other framworks. examples below
If you wanted to use just jQuery you can use the following
PHP Code:/*Firstly pull the main library from Google, this is al you need to load*/
<script src="http://www.google.com/jsapi"></script>
/*Then you can tell the library what frameworks you wish to use*/
google.load("jquery", "1");
/*The second parameter is the version you wish to use. by setting to 1, this will load the latest version in the 1.x range*/
/* Google offer a neat callback function to load when document is ready*/
google.setOnLoadCallback(myCallBackFunc());
/*No heres an example callback function*/
function myCallBackFunc(){
console.log("myCallBackFunc as been called!");
/*Heres just an example usage from jQuery*/
$.getJSON(
"http://ajax.googleapis.com/ajax/services/search/web?q=google&v=1.0&callback=?",
// on search completion, process the results
function (data) {
if (data.responseData.results &&
data.responseData.results.length > 0) {
var results = data.responseData.results;
for (var i=0; i < results.length; i++) {
// Display each result however you wish
alert(results[i].titleNoFormatting);
}
}
});
}
also your versions will always be updated aswell
Heres some links
http://code.google.com/apis/ajaxlibs/
http://code.google.com/apis/ajaxlibs...ex.html#jquery
http://code.google.com/apis/ajax/pla...braries#jquery
I hope you can see that using the was will be much faster for your users and less bandwidth for yourself
peacelitewarez Reviewed by litewarez on . Start using Google CDN for your javasripts ! For those who are using Jquery/MooTools/script.aculo.us etc, you can use google to load your frameworks with ease, the benifits of using the CDN is Less bandwidth Faster loading 1 Javascript call What the CDN Does is provide you with a framework you can use to load all your other framworks. examples below If you wanted to use just jQuery you can use the following Rating: 5Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How Much Does It Cost to Start an Online Business - Start up Your Business from Today
By GarryField in forum Webmasters, Money MakingReplies: 0Last Post: 25th Feb 2014, 12:23 PM -
Google Shutdowns Continue: iGoogle, Google Video, Google Mini & Others Are Killed
By Bretteo in forum News & Current EventsReplies: 16Last Post: 9th Jul 2012, 07:22 AM -
is this stat good enough to start Google AdSence in my blog?
By Breaking Bad in forum General DiscussionReplies: 11Last Post: 22nd Dec 2011, 04:08 PM -
You know leaseweb start 100tb at ?139 see here may b competition start with 100tb.com
By raihan0888 in forum Hosting DiscussionReplies: 1Last Post: 31st May 2011, 10:46 AM
themaCreator - create posts from...
Version 3.21 released. Open older version (or...