<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>David Walsh :: Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞. &#187; Google</title> <atom:link href="http://davidwalsh.name/tutorials/google/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 02 Sep 2010 03:13:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Implement the Google AJAX Search&#160;API</title><link>http://davidwalsh.name/google-ajax-search</link> <comments>http://davidwalsh.name/google-ajax-search#comments</comments> <pubDate>Mon, 02 Aug 2010 14:04:25 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[AJAX]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MooTools]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=5020</guid> <description><![CDATA[Let&#8217;s be honest&#8230;WordPress&#8217; search functionality isn&#8217;t great. Let&#8217;s be more honest&#8230;no search functionality is better than Google&#8217;s. Luckily for us, Google provides an awesome method by which we can use their search for our own site: the Google AJAX Search API. Let me show you how to implement this awesome API within your own website! [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-ajax-search">Implement the Google AJAX Search&nbsp;API</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/search-options' rel='bookmark' title='Permanent Link: Search Type Options with&nbsp;MooTools'>Search Type Options with&nbsp;MooTools</a></li><li><a
href='http://davidwalsh.name/dojo-flickr' rel='bookmark' title='Permanent Link: Create a Dynamic Flickr Image Search with the Dojo&nbsp;Toolkit'>Create a Dynamic Flickr Image Search with the Dojo&nbsp;Toolkit</a></li><li><a
href='http://davidwalsh.name/google-load' rel='bookmark' title='Permanent Link: google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API'>google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API</a></li><li><a
href='http://davidwalsh.name/ajax-username-availability-checker-mootools' rel='bookmark' title='Permanent Link: AJAX Username Availability Checker Using MooTools&nbsp;1.2'>AJAX Username Availability Checker Using MooTools&nbsp;1.2</a></li><li><a
href='http://davidwalsh.name/ajax-spinner-jquery' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;jQuery'>Form Element AJAX Spinner Attachment Using&nbsp;jQuery</a></li></ol>]]></description> <content:encoded><![CDATA[<a
href="http://davidwalsh.name/dw-content/google-ajax-search.php"><img
src="http://davidwalsh.name/dw-content/ajax-search-example.jpg" alt="Google AJAX Search API" /></a><p>Let&#8217;s be honest&#8230;WordPress&#8217; search functionality isn&#8217;t great.  Let&#8217;s be more honest&#8230;no search functionality is better than Google&#8217;s.  Luckily for us, Google provides an awesome method by which we can use their search for our own site:  the Google AJAX Search API.  Let me show you how to implement this awesome API within your own website!</p><div
class="actions"><a
class="demo" href="http://davidwalsh.name/dw-content/google-ajax-search.php">View Demo</a><div
class="clear"></div></div><h2>Sign&nbsp;Up!</h2><p>Google&#8217;s AJAX Search API requires that you <a
href="http://code.google.com/apis/ajaxsearch/key.html">sign up for an API key</a>.  Signing up is free and you&#8217;ll be done with the process of retrieving a key in a few minutes.</p><p><a
href="http://davidwalsh.name/dw-content/google-ajax-search.php"><img
src="http://davidwalsh.name/dw-content/ajax-search-1.jpg" alt="Google AJAX Search API Sign Up" /></a></p><p>You&#8217;ll also need to provide a domain for which they key will work for; one key per domain.</p><h2>The&nbsp;HTML</h2><pre class="html">&lt;!-- SEARCH FORM --&gt;
&lt;form action="http://www.google.com/search" method="get"&gt;
	&lt;!-- HTML5 SEARCH BOX!  --&gt;
	&lt;input type="search" id="search-box" name="q" results="5" placeholder="Search..." autocomplete="on" /&gt;
	&lt;!-- SEARCH davidwalsh.name ONLY! --&gt;
	&lt;input type="hidden" name="sitesearch" value="davidwalsh.name" /&gt;
	&lt;!-- SEARCH BUTTON --&gt;
	&lt;input id="search-submit" type="submit" value="Search" /&gt;
&lt;/form&gt;

&lt;!-- ASYNCHRONOUSLY LOAD THE AJAX SEARCH API;  MOOTOOLS TOO! --&gt;
&lt;script type="text/javascript" src="http://www.google.com/jsapi?key=MY_REALLY_REALLY_REALLY_REALLY_REALLY_REALLY_LONG_KEY"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
	google.load('mootools','1.2.4');
	google.load('search','1');
&lt;/script&gt;</pre><p>You&#8217;ll want to use a &#8220;real&#8221; form so that if the user doesn&#8217;t have JavaScript, they&#8217;ll get directed to Google for their search.  Beyond that, follow the hidden input line to ensure your search will work.  You may also note that the search box has autocomplete and placeholder attributes &#8212; those are HTML5 functionality, nothing to do with Google&#8217;s AJAX Search API.</p><h2>The&nbsp;CSS</h2><pre class="css">/* results positioning */
#search-results		{ position:absolute; z-index:90; top:40px; right:10px; visibility:hidden; }
/* triangle! */
#search-results-pointer { width:0px; height:0px; border-left:20px solid transparent; border-right:20px solid transparent; border-bottom:20px solid #eee; margin-left:80%; }
/* content DIV which holds search results! */
#search-results-content { position:relative; padding:20px; background:#fff; border:3px solid #eee; width:380px; min-height:200px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5) }</pre><p>The CSS above simply position the elements where I want them per my design.  I even used a CSS triangle!</p><h2>The&nbsp;JavaScript</h2><pre class="js">window.addEvent('domready',function(){

	/* search */
	var searchBox = $('search-box'), searchLoaded=false, searchFn = function() {

		/*
			We're lazyloading all of the search stuff.
			After all, why create elements, add listeners, etc. if the user never gets there?
		*/
		if(!searchLoaded) {
			searchLoaded = true; //set searchLoaded to "true"; no more loading!

			//build elements!
			var container = new Element('div',{ id: 'search-results' }).inject($('search-area'),'after');
			var wrapper = new Element('div',{
				styles: {
					position: 'relative'
				}
			}).inject(container);
			new Element('div',{ id: 'search-results-pointer' }).inject(wrapper);
			var contentContainer = new Element('div',{ id: 'search-results-content' }).inject(wrapper);
			var closer = new Element('a', {
				href: 'javascript:;',
				text: 'Close',
				styles: {
					position: 'absolute', //position the "Close" link
					bottom: 35,
					right: 20
				},
				events: {
					click: function() {
						container.fade(0);
					}
				}
			}).inject(wrapper);

			//google interaction
			var search = new google.search.WebSearch(),
				control = new google.search.SearchControl(),
				options = new google.search.DrawOptions();

			//set google options
			options.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
			options.setInput(searchBox);

			//set search options
			search.setUserDefinedClassSuffix('siteSearch');
			search.setSiteRestriction('davidwalsh.name');
			search.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

			//set search controls
			control.addSearcher(search);
			control.draw(contentContainer,options);
			control.setNoResultsString('No results were found.');

			//add listeners to search box
			searchBox.addEvents({
				keyup: function(e) {
					if(searchBox.value &amp;&amp; searchBox.value != searchBox.get('placeholder')) {
						container.fade(0.9);
						control.execute(searchBox.value);
					}
					else {
						container.fade(0);
					}
				}
			});
			searchBox.removeEvent('focus',searchFn);
		}
	};
	searchBox.addEvent('focus',searchFn);
});</pre><p>There&#8217;s a fair amount of JavaScript above so stay with me.  The following are the steps for implementing the Google AJAX API:</p><ul><li>Create an element to house the results of the search.</li><li>Create a &#8220;Close&#8221; link which will allow the user to close the search results window.</li><li>Create our Google-given class instance:<ul><li>A Web Search (you can also create Local Search if you&#8217;d like&#8230;). <a
rel="nofollow" href="http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GwebSearch">google.search.WebSearch options</a>.  I&#8217;ve chosen to add tabs and set the input as my search box.</li><li>A SearchControl instance. <a
rel="nofollow" href="http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearchControl">google.search.SearchControl options</a>.  &#8220;siteSearch&#8221; is my suffix for results, I&#8217;ve restricted my search to the davidwalsh.name domain, and form submission will trigger results to display in the current window (instead of a new window).</li><li>A DrawOptions instance. <a
rel="nofollow" href="http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GdrawOptions">google.search.DrawOptions options</a>.  With my DrawOptions instance, I&#8217;ve set search control, set the draw container with the options we&#8217;ve created, and I&#8217;ve decided to use Google&#8217;s default &#8220;no results&#8221; message</li></ul></li></ul><p>Once the search controls are created, it&#8217;s time to attach events to the search box to show and hide the search results container based on the contents of the search box.  That&#8217;s all!</p><p>As you can see, I&#8217;ve chosen to use the MooTools (FTW) JavaScript toolkit to create the element that houses the results, the &#8220;Close&#8221; link, and to bind events to the search box.  You could just as easily use Dojo or jQuery for element creation and even handling.</p><div
class="actions"><a
class="demo" href="http://davidwalsh.name/dw-content/google-ajax-search.php">View Demo</a><div
class="clear"></div></div><p>In all honesty, I couldn&#8217;t believe how easy it was to implement Google AJAX search.  It&#8217;s an easy want to implement search on your website, especially if you&#8217;re currently using WordPress&#8217; search.  I recommend taking the time to implement Google&#8217;s AJAX Search API &#8212; the day it takes you to get it working will save your users hours of pain!</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-ajax-search">Implement the Google AJAX Search&nbsp;API</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/search-options' rel='bookmark' title='Permanent Link: Search Type Options with&nbsp;MooTools'>Search Type Options with&nbsp;MooTools</a></li><li><a
href='http://davidwalsh.name/dojo-flickr' rel='bookmark' title='Permanent Link: Create a Dynamic Flickr Image Search with the Dojo&nbsp;Toolkit'>Create a Dynamic Flickr Image Search with the Dojo&nbsp;Toolkit</a></li><li><a
href='http://davidwalsh.name/google-load' rel='bookmark' title='Permanent Link: google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API'>google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API</a></li><li><a
href='http://davidwalsh.name/ajax-username-availability-checker-mootools' rel='bookmark' title='Permanent Link: AJAX Username Availability Checker Using MooTools&nbsp;1.2'>AJAX Username Availability Checker Using MooTools&nbsp;1.2</a></li><li><a
href='http://davidwalsh.name/ajax-spinner-jquery' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;jQuery'>Form Element AJAX Spinner Attachment Using&nbsp;jQuery</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/google-ajax-search/feed</wfw:commentRss> <slash:comments>30</slash:comments> </item> <item><title>Google Font&#160;API</title><link>http://davidwalsh.name/google-fonts-api</link> <comments>http://davidwalsh.name/google-fonts-api#comments</comments> <pubDate>Tue, 06 Jul 2010 13:57:10 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[JavaScript]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=5005</guid> <description><![CDATA[Google recently debuted a new web service called the Font API.  Google&#8217;s Font API provides developers a means by which they may quickly and painlessly add custom fonts to their website.  Let&#8217;s take a quick look at the ways by which the Google Font API can be used. View Demo Font Request&#160;Format Many of the [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-fonts-api">Google Font&nbsp;API</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/cufon' rel='bookmark' title='Permanent Link: Font Replacement Using&nbsp;Cufón'>Font Replacement Using&nbsp;Cufón</a></li><li><a
href='http://davidwalsh.name/css-wishlist-css-variables-fonts' rel='bookmark' title='Permanent Link: My CSS&nbsp;Wishlist'>My CSS&nbsp;Wishlist</a></li><li><a
href='http://davidwalsh.name/font-check-plugin' rel='bookmark' title='Permanent Link: MooTools FontChecker&nbsp;Plugin'>MooTools FontChecker&nbsp;Plugin</a></li><li><a
href='http://davidwalsh.name/combine-css-media-styles-file' rel='bookmark' title='Permanent Link: Combine Your CSS Media Styles Into One&nbsp;File'>Combine Your CSS Media Styles Into One&nbsp;File</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Google recently debuted a new web service called the Font API.  <a
href="http://code.google.com/apis/webfonts/" rel="nofollow">Google&#8217;s Font API</a> provides developers a means by which they may quickly and painlessly add custom fonts to their website.  Let&#8217;s take a quick look at the ways by which the Google Font API can be used.</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/google-font-api.php" class="demo">View Demo</a><div
class="clear"></div></div><h2>Font Request&nbsp;Format</h2><p>Many of the fonts within Google&#8217;s font archive are available not only in standard format but also in Italic, Bold, and Italic Bold.  The format for requesting a given font variant is:</p><pre class="css">
{font}:{variant1},{variant2}
</pre><p>Here are a few examples of requesting each variant:</p><pre class="css">
Cantarell
Cantarell:bold
Cantarell:italic
Cantarell:bolditalic
</pre><p>Now let&#8217;s see how we can include special fonts in our page and use these them.</p><h2>The CSS Stylesheet&nbsp;Method</h2><pre class="html">
&lt;link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Cantarell" /&gt;
</pre><p>The stylesheet gets included into the page like any other stylesheet would be.  A query string with a family parameter is appended to the stylesheet&#8217;s URL containing the font(s) to be loaded.  Multiple fonts can be requested with the use of the &#8220;|&#8221; (pipe) character.  A few examples:</p><pre class="html">
&lt;link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Vollkorn" /&gt;
&lt;link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Vollkorn:bold" /&gt;
&lt;link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Vollkorn|IM+Fell+Great+Primer" /&gt;
</pre><p>Take a moment to examine the stylesheet from Google:</p><pre class="css">
@font-face {
	font-family: 'IM Fell Great Primer';
	font-style: normal;
	font-weight: normal;
	src: local('IM Fell Great Primer'), url('http://themes.googleusercontent.com/font?kit=AL8ALGNthei20f9Cu3e93rvDyRCRMn38Ifm6ee4fjno') format('truetype');
}
@font-face {
	font-family: 'Vollkorn';
	font-style: normal;
	font-weight: normal;
	src: local('Vollkorn'), url('http://themes.googleusercontent.com/font?kit=_3YMy3W41J9lZ9YHm0HVxA') format('truetype');
}
</pre><p>The @font-face method of font embedding is Google&#8217;s chosen method.  Using the font is as simple as using a system font:</p><pre class="css">
.mySpecialFontClass	{ font-family:'Vollkorn', serif; }
</pre><p>You may also embed the font within the &#8220;style&#8221; attribute of a given element:</p><pre class="html">
&lt;p style="font-family:'Vollkorn';"&gt;Lorem ipsum....&lt;/p&gt;
</pre><p>I t doesn&#8217;t get more painless than that.</p><h2>The Simple JavaScript&nbsp;Method</h2><p>Google also provides a simple JavaScript method for including custom fonts within a page.  This method requires including the JSAPI JavaScript file and a very small snippet of JavaScript:</p><pre class="html">
&lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
	google.load('webfont','1');
	google.setOnLoadCallback(function() {
		WebFont.load({
			google: {
				families: ['Tangerine','Cantarell']
			}
		});
	});
&lt;/script&gt;
</pre><p>Selecting font variants is done with a simple &#8220;:&#8221; delimiter between the font and the variant:</p><pre class="js">
WebFont.load({
	google: {
		families: ['Tangerine:bold']
	}
});
</pre><p>You may also load multiple fonts within the families array:</p><pre class="js">
WebFont.load({
	google: {
		families: ['Tangerine:bold','Cantarell','Lobster']
	}
});
</pre><p>Simple, no?  If it&#8217;s too simple for you, there&#8217;s more advanced method.</p><h2>The Advanced JavaScript&nbsp;Method</h2><p>The advanced JavaScript method employes an async JavaScript method paired with a WebFontConfig object.  The advanced method also adds callbacks for font requests:</p><pre class="js">
WebFontConfig = {
	google: {
		families: [ 'Tangerine', 'Cantarell' ]
	},
	/* Called when all the specified web-font provider modules (google, typekit, and/or custom) have reported that they have started loading fonts. */
	loading: function() {
		// do something
	},
	/* Called when each requested web font has started loading. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */
	fontloading: function(fontFamily, fontDescription) {
		// do something
	},
	/* Called when each requested web font has finished loading. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */
	fontactive: function(fontFamily, fontDescription) {
		// do something
	},
	/* Called if a requested web font failed to load. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */
	fontinactive: function(fontFamily, fontDescription) {
		// do something
	},
	/* Called when all of the web fonts have either finished loading or failed to load, as long as at least one loaded successfully. */
	active: function() {
		// do something
	},
	/* Called if the browser does not support web fonts or if none of the fonts could be loaded. */
	inactive: function() {
		// do something
	}
};

/* async! */
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</pre><p>If you&#8217;re like me, you loooooooove JavaScript callbacks.  You would use this method if you wanted to &#8220;preload&#8221; fonts before assigning fonts to specific elements.  What&#8217;s also great about this method is that Google uses &#8220;active&#8221; and &#8220;inactive&#8221; CSS class representations on the HTML element to designate what an element&#8217;s settings should be before and after a font has been loaded:</p><pre class="css">
.wf-inactive p { /* Show paragraphs in serif font until fonts have loaded. */
	font-family: serif
}
.wf-active p { /* Show paragraphs in Tangerine when the fonts have loaded. */
	font-family: 'Tangerine', serif
}
.wf-inactive h1 { /* Show heading in serif font until fonts have loaded. */
	font-family: serif;
	font-size: 16px
}
.wf-active h1 { /* Show heading in Cantarell when the fonts have loaded. */
	font-family: 'Cantarell', serif;
	font-size: 16px
}
</pre><p>Unfortunately you need to add these directives to you stylesheet;  I prefer not to.</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/google-font-api.php" class="demo">View Demo</a><div
class="clear"></div></div><p>What do you think of Google latest JavaScript API?  On one side I see the Font API as extremely useful but the other side of me sees Google trying to grab a stronger hold of the Web;  trying to make websites dependent upon them.  What are your thoughts?</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-fonts-api">Google Font&nbsp;API</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/cufon' rel='bookmark' title='Permanent Link: Font Replacement Using&nbsp;Cufón'>Font Replacement Using&nbsp;Cufón</a></li><li><a
href='http://davidwalsh.name/css-wishlist-css-variables-fonts' rel='bookmark' title='Permanent Link: My CSS&nbsp;Wishlist'>My CSS&nbsp;Wishlist</a></li><li><a
href='http://davidwalsh.name/font-check-plugin' rel='bookmark' title='Permanent Link: MooTools FontChecker&nbsp;Plugin'>MooTools FontChecker&nbsp;Plugin</a></li><li><a
href='http://davidwalsh.name/combine-css-media-styles-file' rel='bookmark' title='Permanent Link: Combine Your CSS Media Styles Into One&nbsp;File'>Combine Your CSS Media Styles Into One&nbsp;File</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/google-fonts-api/feed</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Google and the World&#160;Cup</title><link>http://davidwalsh.name/google-world-cup</link> <comments>http://davidwalsh.name/google-world-cup#comments</comments> <pubDate>Tue, 08 Jun 2010 13:57:31 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[Google]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=4985</guid> <description><![CDATA[Anyone that knows me knows I&#8217;m a complete soccer hooligan. The upcoming World Cup has me more excited than a 4 year old at Disneyland. That&#8217;s why I was so pleasantly happy to see Google do something really creative when you search for &#8220;World Cup&#8221;: Clearly Google knows the importance of the World Cup. And [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-world-cup">Google and the World&nbsp;Cup</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/jquery-flot' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics'>Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/google-spy-php-total-search-results' rel='bookmark' title='Permanent Link: Google Grabber &#8212; Using PHP to Find Out How Many Pages Your Domain Has Listed in&nbsp;Google'>Google Grabber &#8212; Using PHP to Find Out How Many Pages Your Domain Has Listed in&nbsp;Google</a></li><li><a
href='http://davidwalsh.name/impressions-google-chrome' rel='bookmark' title='Permanent Link: First Impressions of Google&nbsp;Chrome'>First Impressions of Google&nbsp;Chrome</a></li><li><a
href='http://davidwalsh.name/track-file-downloads-google-analytics-mootools' rel='bookmark' title='Permanent Link: Track File Downloads in Google Analytics Using&nbsp;MooTools'>Track File Downloads in Google Analytics Using&nbsp;MooTools</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Anyone that knows me knows I&#8217;m a complete soccer hooligan.  The upcoming World Cup has me more excited than a 4 year old at Disneyland.  That&#8217;s why I was so pleasantly happy to see Google do something really creative when you search for &#8220;World Cup&#8221;:</p><p><img
src="http://davidwalsh.name/dw-content/google-cup.jpg" alt="" class="image" /></p><p>Clearly Google knows the importance of the World Cup.  And for that&#8230;I will always use Google.</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-world-cup">Google and the World&nbsp;Cup</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/jquery-flot' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics'>Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/google-spy-php-total-search-results' rel='bookmark' title='Permanent Link: Google Grabber &#8212; Using PHP to Find Out How Many Pages Your Domain Has Listed in&nbsp;Google'>Google Grabber &#8212; Using PHP to Find Out How Many Pages Your Domain Has Listed in&nbsp;Google</a></li><li><a
href='http://davidwalsh.name/impressions-google-chrome' rel='bookmark' title='Permanent Link: First Impressions of Google&nbsp;Chrome'>First Impressions of Google&nbsp;Chrome</a></li><li><a
href='http://davidwalsh.name/track-file-downloads-google-analytics-mootools' rel='bookmark' title='Permanent Link: Track File Downloads in Google Analytics Using&nbsp;MooTools'>Track File Downloads in Google Analytics Using&nbsp;MooTools</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/google-world-cup/feed</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Video:  Speed Up Your&#160;JavaScript</title><link>http://davidwalsh.name/javascript-speed</link> <comments>http://davidwalsh.name/javascript-speed#comments</comments> <pubDate>Fri, 26 Mar 2010 14:01:32 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[Google]]></category> <category><![CDATA[JavaScript]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=4938</guid> <description><![CDATA[I generally try to listen to JavaScript/development podcasts and videos when I&#8217;m working.  It&#8217;s a great way to continue to learn and get ideas while doing the ho hum programming busywork that&#8217;s unavoidable.  Here&#8217;s a great Google Talks presentation that was given last summer about JavaScript and speed. After you watch some of it, let [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/javascript-speed">Video:  Speed Up Your&nbsp;JavaScript</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/javascript-good-parts' rel='bookmark' title='Permanent Link: JavaScript: The Good&nbsp;Parts'>JavaScript: The Good&nbsp;Parts</a></li><li><a
href='http://davidwalsh.name/youtube-mp3' rel='bookmark' title='Permanent Link: Automate YouTube Video and MP3 Rips with Bash Shell&nbsp;Scripting'>Automate YouTube Video and MP3 Rips with Bash Shell&nbsp;Scripting</a></li><li><a
href='http://davidwalsh.name/change-text-size-onclick-with-javascript' rel='bookmark' title='Permanent Link: Change Text Size On Click With&nbsp;JavaScript'>Change Text Size On Click With&nbsp;JavaScript</a></li><li><a
href='http://davidwalsh.name/php-timer-benchmark' rel='bookmark' title='Permanent Link: PHP Optimization &#8211; Using A Timer To Benchmark Code And Increase&nbsp;Speed'>PHP Optimization &#8211; Using A Timer To Benchmark Code And Increase&nbsp;Speed</a></li><li><a
href='http://davidwalsh.name/contact' rel='bookmark' title='Permanent Link: Contact'>Contact</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I generally try to listen to JavaScript/development podcasts and videos when I&#8217;m working.  It&#8217;s a great way to continue to learn and get ideas while doing the ho hum programming busywork that&#8217;s unavoidable.  Here&#8217;s a great Google Talks presentation that was given last summer about JavaScript and speed.</p><p><object
width="480" height="385"><param
name="movie" value="http://www.youtube.com/v/mHtdZgou0qU&#038;hl=en_US&#038;fs=1&#038;"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/mHtdZgou0qU&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p><p>After you watch some of it, let me know what you think.  Oh, and trust me, I&#8217;ve seen your JS &#8212; you need this.</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/javascript-speed">Video:  Speed Up Your&nbsp;JavaScript</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/javascript-good-parts' rel='bookmark' title='Permanent Link: JavaScript: The Good&nbsp;Parts'>JavaScript: The Good&nbsp;Parts</a></li><li><a
href='http://davidwalsh.name/youtube-mp3' rel='bookmark' title='Permanent Link: Automate YouTube Video and MP3 Rips with Bash Shell&nbsp;Scripting'>Automate YouTube Video and MP3 Rips with Bash Shell&nbsp;Scripting</a></li><li><a
href='http://davidwalsh.name/change-text-size-onclick-with-javascript' rel='bookmark' title='Permanent Link: Change Text Size On Click With&nbsp;JavaScript'>Change Text Size On Click With&nbsp;JavaScript</a></li><li><a
href='http://davidwalsh.name/php-timer-benchmark' rel='bookmark' title='Permanent Link: PHP Optimization &#8211; Using A Timer To Benchmark Code And Increase&nbsp;Speed'>PHP Optimization &#8211; Using A Timer To Benchmark Code And Increase&nbsp;Speed</a></li><li><a
href='http://davidwalsh.name/contact' rel='bookmark' title='Permanent Link: Contact'>Contact</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/javascript-speed/feed</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Google-Style Element Fading Using MooTools or&#160;jQuery</title><link>http://davidwalsh.name/google-fade</link> <comments>http://davidwalsh.name/google-fade#comments</comments> <pubDate>Mon, 01 Feb 2010 14:07:24 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Markup]]></category> <category><![CDATA[MooTools]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=4726</guid> <description><![CDATA[Google recently introduced an interesting effect to their homepage: the top left and top right navigation items don&#8217;t display until you move your mouse or leave the search term box. Why? I can only speculate that they want their homepage as simple as possible; after all, the search box is given focus immediately and at [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-fade">Google-Style Element Fading Using MooTools or&nbsp;jQuery</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/ajax-spinner-jquery' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;jQuery'>Form Element AJAX Spinner Attachment Using&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/comment-mootools-jquery' rel='bookmark' title='Permanent Link: WordPress-Style Comment Controls Using MooTools or&nbsp;jQuery'>WordPress-Style Comment Controls Using MooTools or&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/fading-links-jquery-dwfadinglinks' rel='bookmark' title='Permanent Link: Fading Links Using jQuery:&nbsp;dwFadingLinks'>Fading Links Using jQuery:&nbsp;dwFadingLinks</a></li><li><a
href='http://davidwalsh.name/jquery-create-element' rel='bookmark' title='Permanent Link: MooTools-Like Element Creation in&nbsp;jQuery'>MooTools-Like Element Creation in&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/ajax-spinner' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;MooTools'>Form Element AJAX Spinner Attachment Using&nbsp;MooTools</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://davidwalsh.name/dw-content/google-fade.php"><img
src="http://davidwalsh.name/dw-content/google-homepage.jpg" alt="Google Homepage" /></a></p><p>Google recently introduced an interesting effect to their homepage:  the top left and top right navigation items don&#8217;t display until you move your mouse or leave the search term box.  Why?   I can only speculate that they want their homepage as simple as possible;  after all, the search box is given focus immediately and at least half of their users probably just type their term and hit enter &#8212; no need for more clutter.  Here&#8217;s how you can implement a similar system with MooTools or jQuery.</p><div
class="actions"> <a
href="http://davidwalsh.name/dw-content/google-fade.php" class="demo">View MooTools Demo</a> <a
href="http://davidwalsh.name/dw-content/google-fade.php?jquery" class="demo">View jQuery Demo</a><div
class="clear"></div></div><h2>The&nbsp;HTML</h2><pre class="html">
&lt;body&gt;
	&lt;div id=&quot;fade1&quot; class=&quot;fadein&quot;&gt;{ fade area 1 }&lt;/div&gt;
	&lt;div id=&quot;fade2&quot; class=&quot;fadein&quot;&gt;{ fade area 2 }&lt;/div&gt;
	&lt;div id=&quot;fade3&quot; class=&quot;fadein&quot;&gt;{ fade area 3 }&lt;/div&gt;
	&lt;!-- other stuff here --&gt;
&lt;/body&gt;
</pre><p>Place the HTML where you&#8217;d like &#8212; it has no bearing on our system besides needing each element to have the fadein CSS class.</p><h2>The&nbsp;CSS</h2><pre class="css">
@media all {
	.fadein	{ visibility:hidden; }
	#fade1	{ /* place wherever on the page */ }
	#fade2	{ /* place wherever on the page */ }
	#fade3	{ /* place wherever on the page */ }
}
@media handheld {
	.fadein	{ visibility:visible; }
}
</pre><p>The elements that will fade in will need to have their visibility set to hidden.  We&#8217;ll accommodate for the no-JavaScript user below.</p><h2>The MooTools&nbsp;JavaScript</h2><pre class="js">
/* via @appden, Scott Kyle, http://appden.com/javascript/fun-with-custom-events-on-elements-in-mootools/ */
Native.implement([Element, Window, Document, Events], {
	oneEvent: function(type, fn) {
		return this.addEvent(type, function() {
			this.removeEvent(type, arguments.callee);
			return fn.apply(this, arguments);
		});
	}
});

/* make it happen! */
window.addEvent('domready',function() {
	var fades = $$('.fadein').setStyle('opacity',0);
	var doFadeIn = function(e) {
		if(!e.key || e.key == 'tab') {
			fades.fade('in');
		}
	};
	$(document.body).oneEvent('mousemove',doFadeIn);
	$('s').oneEvent('blur',doFadeIn);
});
</pre><p>When the DOM is ready, we grab all of the elements that are mean to fade in and&#8230;get this&#8230;fade them in.</p><h2>The jQuery&nbsp;JavaScript</h2><pre class="js">
$(document).ready(function() {
	var doFadeIn = function() {
		$('.fadein').css({ opacity:0, visibility:'visible'}).fadeTo(250,1);
	};
	$('body').one('mousemove',doFadeIn);
	$('#s').one('blur',doFadeIn);
});
</pre><p>This is the equivalent jQuery JavaScript code.</p><h2>Accommodating for No-Javascript&nbsp;Users</h2><pre class="html">
&lt;noscript&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		.fadein	{ visibility:visible; }
	&lt;/style&gt;
&lt;/noscript&gt;
</pre><p>We undo the initial hiding of the elements.  Duh.</p><div
class="actions"> <a
href="http://davidwalsh.name/dw-content/google-fade.php" class="demo">View MooTools Demo</a> <a
href="http://davidwalsh.name/dw-content/google-fade.php?jquery" class="demo">View jQuery Demo</a><div
class="clear"></div></div><p>It&#8217;s a subtle effect but a good idea on Google&#8217;s part.</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/google-fade">Google-Style Element Fading Using MooTools or&nbsp;jQuery</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/ajax-spinner-jquery' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;jQuery'>Form Element AJAX Spinner Attachment Using&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/comment-mootools-jquery' rel='bookmark' title='Permanent Link: WordPress-Style Comment Controls Using MooTools or&nbsp;jQuery'>WordPress-Style Comment Controls Using MooTools or&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/fading-links-jquery-dwfadinglinks' rel='bookmark' title='Permanent Link: Fading Links Using jQuery:&nbsp;dwFadingLinks'>Fading Links Using jQuery:&nbsp;dwFadingLinks</a></li><li><a
href='http://davidwalsh.name/jquery-create-element' rel='bookmark' title='Permanent Link: MooTools-Like Element Creation in&nbsp;jQuery'>MooTools-Like Element Creation in&nbsp;jQuery</a></li><li><a
href='http://davidwalsh.name/ajax-spinner' rel='bookmark' title='Permanent Link: Form Element AJAX Spinner Attachment Using&nbsp;MooTools'>Form Element AJAX Spinner Attachment Using&nbsp;MooTools</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/google-fade/feed</wfw:commentRss> <slash:comments>27</slash:comments> </item> <item><title>Async Google&#160;Analytics</title><link>http://davidwalsh.name/async-google-analytics</link> <comments>http://davidwalsh.name/async-google-analytics#comments</comments> <pubDate>Fri, 22 Jan 2010 14:16:53 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[APIs]]></category> <category><![CDATA[Google]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=4657</guid> <description><![CDATA[It seems like every website these days uses Google Analytics. And why not? It&#8217;s an outstanding tool that gives you any and every statistic you could ever want. The problem with Google Analytics is that it&#8217;s been, well, slow loading at times. That&#8217;s why I was so pumped when I saw Google was releasing an [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/async-google-analytics">Async Google&nbsp;Analytics</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/track-file-downloads-google-analytics-mootools' rel='bookmark' title='Permanent Link: Track File Downloads in Google Analytics Using&nbsp;MooTools'>Track File Downloads in Google Analytics Using&nbsp;MooTools</a></li><li><a
href='http://davidwalsh.name/php-google-analytics' rel='bookmark' title='Permanent Link: Retrieve Google Analytics Visits and PageViews with&nbsp;PHP'>Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/mootools-google-analytics-track-outbound-links' rel='bookmark' title='Permanent Link: Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links'>Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links</a></li><li><a
href='http://davidwalsh.name/track-ajax-link-clicks-google-analytics' rel='bookmark' title='Permanent Link: Track AJAX Link Clicks Using Google&nbsp;Analytics'>Track AJAX Link Clicks Using Google&nbsp;Analytics</a></li></ol>]]></description> <content:encoded><![CDATA[<p>It seems like every website these days uses Google Analytics.  And why not?  It&#8217;s an outstanding tool that gives you any and every statistic you could ever want.  The problem with Google Analytics is that it&#8217;s been, well, slow loading at times.  That&#8217;s why I was so pumped when I saw Google was releasing an async version of their script.</p><h2>Google Analytics&nbsp;JavaScript</h2><pre class="js">
&lt;script type=&quot;text/javascript&quot;&gt;
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-#######-#']); //your code here
    _gaq.push(['_trackPageview']);
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();
&lt;/script&gt;
</pre><p>The one thing you&#8217;ll notice is the <span
class="attribute">async</span> attribute being set to <span
class="attribute">true</span>.  Obviously you&#8217;ll want to use your own Analytics code within the top portion of the JavaScript.  You&#8217;ll also want to put this at the top of the <span
class="tag">BODY</span>.  What a difference the async version can make &#8212; my website seems to load faster due to this upgrade!</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/async-google-analytics">Async Google&nbsp;Analytics</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/track-file-downloads-google-analytics-mootools' rel='bookmark' title='Permanent Link: Track File Downloads in Google Analytics Using&nbsp;MooTools'>Track File Downloads in Google Analytics Using&nbsp;MooTools</a></li><li><a
href='http://davidwalsh.name/php-google-analytics' rel='bookmark' title='Permanent Link: Retrieve Google Analytics Visits and PageViews with&nbsp;PHP'>Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/mootools-google-analytics-track-outbound-links' rel='bookmark' title='Permanent Link: Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links'>Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links</a></li><li><a
href='http://davidwalsh.name/track-ajax-link-clicks-google-analytics' rel='bookmark' title='Permanent Link: Track AJAX Link Clicks Using Google&nbsp;Analytics'>Track AJAX Link Clicks Using Google&nbsp;Analytics</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/async-google-analytics/feed</wfw:commentRss> <slash:comments>25</slash:comments> </item> <item><title>Dynamically Create Charts Using jQuery Flot and Google&#160;Analytics</title><link>http://davidwalsh.name/jquery-flot</link> <comments>http://davidwalsh.name/jquery-flot#comments</comments> <pubDate>Thu, 22 Oct 2009 12:34:25 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[APIs]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=4048</guid> <description><![CDATA[Earlier in the week I published a popular article titled Dynamically Create Charts Using MooTools MilkChart and Google Analytics. My post showed you how to use MooTools MilkChart and a splash of PHP to create beautiful charts of Google Analytics data. I was interested in seeing what jQuery had to offer in the charting department. [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/jquery-flot">Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/milkchart' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics'>Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/php-google-analytics' rel='bookmark' title='Permanent Link: Retrieve Google Analytics Visits and PageViews with&nbsp;PHP'>Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/track-ajax-link-clicks-google-analytics' rel='bookmark' title='Permanent Link: Track AJAX Link Clicks Using Google&nbsp;Analytics'>Track AJAX Link Clicks Using Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li></ol>]]></description> <content:encoded><![CDATA[<p><img
src="http://davidwalsh.name/dw-content/flot.png" alt="jQuery Flot" /></p><p>Earlier in the week I published a popular article titled <a
href="http://davidwalsh.name/milkchart">Dynamically Create Charts Using MooTools MilkChart and Google Analytics</a>.  My post showed you how to use MooTools MilkChart and a splash of PHP to create beautiful charts of Google Analytics data.  I was interested in seeing what jQuery had to offer in the charting department. <a
href="http://code.google.com/p/flot/">jQuery Flot</a> is what I found.</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/flot.php?month=9&#038;year=2009" class="demo">View Demo</a><div
class="clear"></div></div><h2>The&nbsp;PHP</h2><pre class="php">
/* defaults */
$month = date('n');
$year = date('Y');

/* submission? */
if($_GET['month'] || $_GET['year']):
	/* cleanse lookups */
	$month = (int) $_GET['month']; if(!$month) { $month = 1; }
	$year = (int) $_GET['year']; if(!$year) { $year = date('Y'); }
	/* retrieve information from google analytics */
	require 'ga/analytics.class.php';
	$analytics = new analytics('&#121;ou&#114;&#97;c&#99;&#111;u&#110;t&#64;g&#109;ai&#108;&#46;&#99;&#111;&#109;', 'password');
	$analytics-&gt;setProfileByName('yourdomain.com');
	$analytics-&gt;setMonth($month,$year);
	$visits = $analytics-&gt;getVisitors();
	$views = $analytics-&gt;getPageviews();
	/* build tables */
	if(count($visits)) {
		foreach($visits as $day=&gt;$visit) { 
			$flot_datas_visits[] = '['.$day.','.$visit.']';
			$flot_datas_views[] = '['.$day.','.$views[$day].']';
		}
		$flot_data_visits = '['.implode(',',$flot_datas_visits).']';
		$flot_data_views = '['.implode(',',$flot_datas_views).']';
	}
endif;
</pre><p>The above code is the same as my MooTools post with the exception of the statistics output format.  jQuery flot prefers arrays instead of  a  HTML table.</p><h2>The jQuery Flot&nbsp;JavaScript</h2><pre class="js">
$(document).ready(function() {
	var visits = &lt;?php echo $flot_data_visits; ?&gt;;
	var views = &lt;?php echo $flot_data_views; ?&gt;;
	$('#placeholder').css({
		height: '400px',
		width: '600px'
	});
	$.plot($('#placeholder'),[
			{ label: 'Visits', data: visits },
			{ label: 'Pageviews', data: views }
		],{
	        lines: { show: true },
	        points: { show: true },
	        grid: { backgroundColor: '#fffaff' }
	});
});
</pre><p>The above is a simple example of using jQuery Flot&#8217;s plot method.  Simply provide the placeholder and statistical data from the PHP above.</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/flot.php?month=9&#038;year=2009" class="demo">View Demo</a><div
class="clear"></div></div><h2>Comparison</h2><ul><li>jQuery Flot provides IE support via ExCanvas, which is great.</li><li>MilkChart allows for pie charts while Flot doesn&#8217;t.  I prefer pie charts to other chart types.</li><li>MilkChart allows for easy creation of charts from HTML tables (good for accessibility) while jQuery Flot requires an array syntax.</li></ul><p>What do you think?  Which method do you prefer?</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/jquery-flot">Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/milkchart' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics'>Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/php-google-analytics' rel='bookmark' title='Permanent Link: Retrieve Google Analytics Visits and PageViews with&nbsp;PHP'>Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/track-ajax-link-clicks-google-analytics' rel='bookmark' title='Permanent Link: Track AJAX Link Clicks Using Google&nbsp;Analytics'>Track AJAX Link Clicks Using Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/jquery-flot/feed</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Remotely Download Google AJAX Libraries Using&#160;PHP</title><link>http://davidwalsh.name/download-google-ajax-libraries</link> <comments>http://davidwalsh.name/download-google-ajax-libraries#comments</comments> <pubDate>Wed, 30 Sep 2009 12:25:07 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[AJAX]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=3757</guid> <description><![CDATA[I don&#8217;t know how to use all of the JavaScript libraries but perusing their code is interesting. If I&#8217;m looking to code something I&#8217;ll look at how each of the other libraries accomplishes the task. The problem is that you need to go out and download each one. And of course they&#8217;re all on different [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/download-google-ajax-libraries">Remotely Download Google AJAX Libraries Using&nbsp;PHP</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/google-load' rel='bookmark' title='Permanent Link: google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API'>google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API</a></li><li><a
href='http://davidwalsh.name/detect-ajax' rel='bookmark' title='Permanent Link: Detect an AJAX Request in&nbsp;PHP'>Detect an AJAX Request in&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/google-ajax-search' rel='bookmark' title='Permanent Link: Implement the Google AJAX Search&nbsp;API'>Implement the Google AJAX Search&nbsp;API</a></li><li><a
href='http://davidwalsh.name/google-fonts-api' rel='bookmark' title='Permanent Link: Google Font&nbsp;API'>Google Font&nbsp;API</a></li><li><a
href='http://davidwalsh.name/download-urls-content-php-curl' rel='bookmark' title='Permanent Link: Download a URL&#8217;s Content Using PHP&nbsp;cURL'>Download a URL&#8217;s Content Using PHP&nbsp;cURL</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I don&#8217;t know how to use all of the JavaScript libraries but perusing their code is interesting.   If I&#8217;m looking to code something I&#8217;ll look at how each of the other libraries accomplishes the task.  The problem is that you need to go out and download each one.  And of course they&#8217;re all on different development schedules so you&#8217;d also need to make sure to grab the latest version of the library.  Instead of manually accomplishing that task, I&#8217;ve chosen create a script that does all of that for me.</p><h2>The&nbsp;PHP</h2><pre class="php">//settings
$dir = 'js-libs/';
$url = 'http://code.google.com/apis/ajaxlibs/documentation/index.html';

//open file
$content = get_content($url);
echo 'Retrieved page from Google.';

//parse
$regex = '/http:\/\/ajax.googleapis.com\/ajax\/libs\/.*.js/isU';

//match?
preg_match_all($regex,$content,$matches);

//make sure there are no repeated files
$js_files = array_unique($matches[0]);

//download every file and save locally
foreach($js_files as $file) {
	//download
	$content = get_content($file);
	//save
	$filename = str_replace(array('http://ajax.googleapis.com/ajax/libs/','/'),array('','-'),$file);
	file_put_contents($dir.$filename,$content);
	//
	echo 'saving ',$file;
}

//function to grab content from a url
function get_content($url) {
	$ch = curl_init();
	curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
	curl_setopt($ch,CURLOPT_URL,$url);
	curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
	$content = curl_exec($ch);
	curl_close($ch);
	return $content;
}</pre><p>Pow!  One quick script to get you all of the popular JavaScript libraries in 10 seconds.  You may not know how to use each library but it sure doesn&#8217;t hurt to have them around.</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/download-google-ajax-libraries">Remotely Download Google AJAX Libraries Using&nbsp;PHP</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/google-load' rel='bookmark' title='Permanent Link: google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API'>google.load():  Utilize Google&#8217;s AJAX Libraries&nbsp;API</a></li><li><a
href='http://davidwalsh.name/detect-ajax' rel='bookmark' title='Permanent Link: Detect an AJAX Request in&nbsp;PHP'>Detect an AJAX Request in&nbsp;PHP</a></li><li><a
href='http://davidwalsh.name/google-ajax-search' rel='bookmark' title='Permanent Link: Implement the Google AJAX Search&nbsp;API'>Implement the Google AJAX Search&nbsp;API</a></li><li><a
href='http://davidwalsh.name/google-fonts-api' rel='bookmark' title='Permanent Link: Google Font&nbsp;API'>Google Font&nbsp;API</a></li><li><a
href='http://davidwalsh.name/download-urls-content-php-curl' rel='bookmark' title='Permanent Link: Download a URL&#8217;s Content Using PHP&nbsp;cURL'>Download a URL&#8217;s Content Using PHP&nbsp;cURL</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/download-google-ajax-libraries/feed</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Retrieve Google Analytics Visits and PageViews with&#160;PHP</title><link>http://davidwalsh.name/php-google-analytics</link> <comments>http://davidwalsh.name/php-google-analytics#comments</comments> <pubDate>Tue, 29 Sep 2009 12:27:52 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[APIs]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=3806</guid> <description><![CDATA[Google Analytics is an outstanding website analytics tool that gives you way more information about your website than you probably need. Better to get more than you want than not enough, right? Anyways I check my website statistics more often than I should and it ends up taking a few minutes to get logged in, [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/php-google-analytics">Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/milkchart' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics'>Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/jquery-flot' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics'>Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/mootools-google-analytics-track-outbound-links' rel='bookmark' title='Permanent Link: Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links'>Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Google Analytics is an outstanding website analytics tool that gives you way more information about your website than you probably need.  Better to get more than you want than not enough, right?  Anyways I check my website statistics more often than I should and it ends up taking a few minutes to get logged in, select the right site, select the current day, etc.  I found a great Google Analytics PHP API that allows me to get just the statistics I&#8217;m looking for.</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/google-analytics-stats-2.php" class="demo">View Demo</a><div
class="clear"></div></div><h2>The PHP&nbsp;Library</h2><p>The PHP class I found, <span
class="var">analytics</span>, can be downloaded at <a
href="http://www.swis.nl/ga/">http://www.swis.nl/ga/</a>.  The site also gives a few solid examples.</p><h2>The&nbsp;PHP</h2><pre class="php">
//session_start for caching, if desired
session_start();
//get the class
require 'ga/analytics.class.php';
//sign in and grab profile
$analytics = new analytics('&#100;avi&#100;&#64;da&#118;i&#100;&#119;a&#108;sh&#46;n&#97;&#109;&#101;', 'myP@ssw0rd');
$analytics->setProfileByName('davidwalsh.name');
//set the date range for which I want stats for (could also be $analytics->setDateRange('YYYY-MM-DD', 'YYYY-MM-DD'))
$analytics->setMonth(date('n'), date('Y'));
//get array of visitors by day
print_r($analytics->getVisitors());
//get array of pageviews by day
print_r($analytics->getPageviews());
</pre><p>As you&#8217;d expect, we first grab the class and immediately sign providing your credentials and website profile (you can just use your domain).   Once authenticated we set a date range and retrieve our visitors and pageviews.</p><h2>The Sample PHP&nbsp;Results</h2><p>The above code retrieved visits and pageviews for the current month.  What&#8217;s returned is an array that looks as follows:</p><pre class="html">
Array
(
    [01] => 6539
    [02] => 6677
    [03] => 6160
    [04] => 5563
    [05] => 2964
    [06] => 2973
    [07] => 5080
    [08] => 6078
    [09] => 5927
    [10] => 6177
	...
)
</pre><p>A very simple array numbered by day.  You could do anything you wanted with the array &#8212; create averages, peaks, lows, etc.</p><h2>Advanced&nbsp;Usage</h2><p>The <span
class="var">analytics</span> class also allows you to retrieve search keywords and anything else you might like:</p><pre class="php">
$keywords = $analytics->getData(array(
						'dimensions' => 'ga:keyword',
		                'metrics' => 'ga:visits',
		                'sort' => 'ga:keyword'
						)
					);
</pre><p>The PHP <span
class="var">analytics</span> class is a masterpiece.  Rest assured I&#8217;ll be doing a ton of work with this class for customers and my own websites!  Do you have any ideas as to what you could use this class for?  Share!</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/php-google-analytics">Retrieve Google Analytics Visits and PageViews with&nbsp;PHP</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/milkchart' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics'>Dynamically Create Charts Using MooTools MilkChart and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/jquery-flot' rel='bookmark' title='Permanent Link: Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics'>Dynamically Create Charts Using jQuery Flot and Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/async-google-analytics' rel='bookmark' title='Permanent Link: Async Google&nbsp;Analytics'>Async Google&nbsp;Analytics</a></li><li><a
href='http://davidwalsh.name/mootools-google-analytics-track-outbound-links' rel='bookmark' title='Permanent Link: Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links'>Using MooTools to Instruct Google Analytics to Track Outbound&nbsp;Links</a></li><li><a
href='http://davidwalsh.name/secure-ssl-google-analytics' rel='bookmark' title='Permanent Link: Secure (SSL) Google&nbsp;Analytics'>Secure (SSL) Google&nbsp;Analytics</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/php-google-analytics/feed</wfw:commentRss> <slash:comments>47</slash:comments> </item> <item><title>Turn Internet Explorer into Chrome with Chrome&#160;Frame</title><link>http://davidwalsh.name/chrome-frame</link> <comments>http://davidwalsh.name/chrome-frame#comments</comments> <pubDate>Wed, 23 Sep 2009 02:00:59 +0000</pubDate> <dc:creator>David Walsh</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Microsoft]]></category><guid
isPermaLink="false">http://davidwalsh.name/?p=3787</guid> <description><![CDATA[I&#8217;m just going to cut to the chase: Internet Explorer is rubbish. I don&#8217;t care what version you throw at me &#8212; 6, 7, 8&#8230;rubbish. Apparently Google agrees with me because they&#8217;ve released Google Chrome Frame, a browser plugin and META tag system that allows you to turn IE installs into a virtual &#8220;Chrome&#8221; install [...]<p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/chrome-frame">Turn Internet Explorer into Chrome with Chrome&nbsp;Frame</a></p>Related posts:<ol><li><a
href='http://davidwalsh.name/impressions-google-chrome' rel='bookmark' title='Permanent Link: First Impressions of Google&nbsp;Chrome'>First Impressions of Google&nbsp;Chrome</a></li><li><a
href='http://davidwalsh.name/internet-explorer-cannot-open-internet-site' rel='bookmark' title='Permanent Link: IE Says &#8220;Internet Explorer cannot open the Internet Site ________. Operation Aborted.&#8221;  I Say&nbsp;&#8220;WTF?&#8221;'>IE Says &#8220;Internet Explorer cannot open the Internet Site ________. Operation Aborted.&#8221;  I Say&nbsp;&#8220;WTF?&#8221;</a></li><li><a
href='http://davidwalsh.name/rounded-corners-ie' rel='bookmark' title='Permanent Link: Rounded Corners in Internet&nbsp;Explorer'>Rounded Corners in Internet&nbsp;Explorer</a></li><li><a
href='http://davidwalsh.name/css-image-filters-internet-explorer' rel='bookmark' title='Permanent Link: CSS Image Filters in Internet&nbsp;Explorer'>CSS Image Filters in Internet&nbsp;Explorer</a></li><li><a
href='http://davidwalsh.name/detecting-google-chrome-javascript' rel='bookmark' title='Permanent Link: Detecting Google Chrome Using&nbsp;JavaScript'>Detecting Google Chrome Using&nbsp;JavaScript</a></li></ol>]]></description> <content:encoded><![CDATA[<img
src="http://davidwalsh.name/dw-content/chrome-logo.png" alt="Google Chrome" class="image" /><p>I&#8217;m just going to cut to the chase:  Internet Explorer is rubbish.  I don&#8217;t care what version you throw at me &#8212; 6, 7, 8&#8230;rubbish.  Apparently Google agrees with me because they&#8217;ve released Google Chrome Frame, a browser plugin and META tag system that allows you to turn IE installs into a virtual &#8220;Chrome&#8221; install so that IE will support HTML5&#8242;s canvas tag and take advantage of JavaScript performance improvements featured in Google Chrome.</p><h2>Step 1:  The&nbsp;Plugin</h2><p>The user must first download the Chrome Frame plugin at the <a
href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame page</a>.  The install works on XP and Vista operating systems, IE browser versions 6, 7, and 8.</p><h2>Step 2:  The HTML META&nbsp;tag</h2><p>To activate Chromified Internet Explorer you must add the following META tag to your pages:</p><pre class="html">
&lt;meta http-equiv="X-UA-Compatible" content="chrome=1" /&gt;
</pre><p>That&#8217;s it!  Check out a demo here:</p><div
class="actions"><a
href="http://davidwalsh.name/dw-content/chrome-frame.php" class="demo">View Demo</a><div
class="clear"></div></div><h2>More&nbsp;Details</h2><p>Jump over to the <a
href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame page</a> to get more details about this project.  There&#8217;s a great video featuring Alex Russell (of Dojo fame) where he explains the reason for Chrome Frame and usage.</p><h2>Our&nbsp;Savior?</h2><p>I don&#8217;t believe so.  There are two big problems I see:</p><ul><li>Most IT teams are keeping their businesses employees in the dark world of IE6.  Chrome Frame would be a great solution for employees looking to get with the 90&#8242;s but how many businesses give their employees proper permissions to install applications?  No many.</li><li>Users who don&#8217;t know the difference wont put an effort into downloading this plugin (i.e. my grandmother doesn&#8217;t even know what a browser is, much less IE and why it&#8217;s bad).</li></ul><h2>Thoughts?</h2><p>I&#8217;m very interested in seeing what you all think of this.  Crap?  Gold?  Let me know what you think!</p><p><strong>Follow Me!</strong> <a
href="http://twitter.com/davidwalshblog">Twitter</a> | <a
href="http://www.facebook.com/#!/pages/David-Walsh-Blog/186644584869">Facebook</a> | <a
href="http://www.linkedin.com/in/davidjameswalsh">LinkedIn</a> | <a
href="http://mootools.net/forge/profile/davidwalsh">MooTools Forge.</a><br/><br/>Full David Walsh Blog Post: <a
href="http://davidwalsh.name/chrome-frame">Turn Internet Explorer into Chrome with Chrome&nbsp;Frame</a></p><p>Related posts:<ol><li><a
href='http://davidwalsh.name/impressions-google-chrome' rel='bookmark' title='Permanent Link: First Impressions of Google&nbsp;Chrome'>First Impressions of Google&nbsp;Chrome</a></li><li><a
href='http://davidwalsh.name/internet-explorer-cannot-open-internet-site' rel='bookmark' title='Permanent Link: IE Says &#8220;Internet Explorer cannot open the Internet Site ________. Operation Aborted.&#8221;  I Say&nbsp;&#8220;WTF?&#8221;'>IE Says &#8220;Internet Explorer cannot open the Internet Site ________. Operation Aborted.&#8221;  I Say&nbsp;&#8220;WTF?&#8221;</a></li><li><a
href='http://davidwalsh.name/rounded-corners-ie' rel='bookmark' title='Permanent Link: Rounded Corners in Internet&nbsp;Explorer'>Rounded Corners in Internet&nbsp;Explorer</a></li><li><a
href='http://davidwalsh.name/css-image-filters-internet-explorer' rel='bookmark' title='Permanent Link: CSS Image Filters in Internet&nbsp;Explorer'>CSS Image Filters in Internet&nbsp;Explorer</a></li><li><a
href='http://davidwalsh.name/detecting-google-chrome-javascript' rel='bookmark' title='Permanent Link: Detecting Google Chrome Using&nbsp;JavaScript'>Detecting Google Chrome Using&nbsp;JavaScript</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://davidwalsh.name/chrome-frame/feed</wfw:commentRss> <slash:comments>38</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 172/422 queries in 5.702 seconds using disk

Served from: davidwalsh.name @ 2010-09-02 23:20:32 -->