jQuery on Google Cloud
Wednesday, September 29, 2010 |
Edit Post
One of the downsides to distributed cloud computing is the increased number of HTTP requests that are required in order to pull together a given web page. Each time an externally located resource is needed, the web browser must resolve the hostname and create a discrete HTTP socket in order to fetch it.
The client realizes this as an increasing performance penalty -a slow site.
Ideally in terms of performance, a single HTTP request would fetch a single resource that contained a complete HTML document. This can be helped along by embedding CSS style sheets and JavaScript along with the HTML document as appose to referencing them externally. In reality however, the fetched page more likely instructs the client browser to fetch several other linked resources in order to assemble the final document.
The prevalence of the increasing number of external resources is being driven by the rapid development and popularity of third-party libraries such as JQuery.
Google Libries API offers managed distributed code serving via google.load() along with their own search and other open-source APIs. By offloading this to Google's code distribution in the cloud, version control, file size and caching of third-party APIs can be optimized. Google Libraries API currently hosts the following resources:
Google requires an API key to use methods such as google.load() on non-Google domains. You can link directly to the libraries like this:
Paths to each Google Library API can be found here.
Or load JSAPI with an API key as follows:
Sign up for a Google API key here.
The client realizes this as an increasing performance penalty -a slow site.
Ideally in terms of performance, a single HTTP request would fetch a single resource that contained a complete HTML document. This can be helped along by embedding CSS style sheets and JavaScript along with the HTML document as appose to referencing them externally. In reality however, the fetched page more likely instructs the client browser to fetch several other linked resources in order to assemble the final document.
The prevalence of the increasing number of external resources is being driven by the rapid development and popularity of third-party libraries such as JQuery.
Google Libries API offers managed distributed code serving via google.load() along with their own search and other open-source APIs. By offloading this to Google's code distribution in the cloud, version control, file size and caching of third-party APIs can be optimized. Google Libraries API currently hosts the following resources:
- Chrome Frame
- Dojo
- Ext Core
- jQuery
- jQuery UI
- MooTools
- Prototype
- script.aculo.us
- SWFObject
- Yahoo! User Interface Library (YUI)
- WebFont Loader
/* * Place the following code between <head></head> tags * of your blogger template. * */ <script src="http://www.google.com/jsapi" > </script> <script > google.load("jquery", "1.4.2"); // google.load("jquery", "1") if a specific version is not required google.load("jqueryui", "1.8"); </script>
Google requires an API key to use methods such as google.load() on non-Google domains. You can link directly to the libraries like this:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"> </script>
Paths to each Google Library API can be found here.
Or load JSAPI with an API key as follows:
<script src="http://www.google.com/jsapi?KEY=yourAPIKeyHere"> </script>
Sign up for a Google API key here.
Labels:
Javascript,
Tech
Dynamic Page QR Code
Popular Posts
-
Product Manager Cover Letter: This real cover letter worked successfully at getting an interview as a product manager. Use it as a templat...
-
Creating randomized valid file paths is a common requirement for many applications such as the case of short url redirects. The Goo.gl url s...
-
If you're interested in placing QR tags dynamically on your site, here's how I did it in less than 5 minutes thanks to Google's ...
-
Cover Letter Examples that I have used successfully to get a job interview: Further to my last post on this topic, there's no substi...
-
Is there a scientific reason that can explain Why People are So stupid? It's not surprising that so many people take advantage of being...
-
Sample for Cover Letters Writing an effective cover letter is essential to get yourself noticed. Use your cover letter as a sample of your...
-
Decoded HTML Encoded HTML Entities /** * Encode HTML tags as HTML Entities * using jQuery * * Code takes raw...
-
In my opinion, Git is a programmers program. It is fast, feature-rich yet intuitive, kind of like Google...there's a new treasure waitin...
-
Blogger RSS URL s can be customized to syndicate content in a user friendly way. This is especially important if you operate a multi-issue b...
-
The example below uses Google's OpenID API to request and validate the user's GMail address. The visitor is first directed to Google...
0 comments:
Post a Comment