<?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>Seifi.org &#187; seo</title>
	<atom:link href="http://www.seifi.org/category/seo/feed" rel="self" type="application/rss+xml" />
	<link>http://www.seifi.org</link>
	<description>A Web Development Blog by Joe Seifi - seifi.org</description>
	<lastBuildDate>Thu, 26 Jan 2012 01:08:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Optimizing the Google +1 button for speed</title>
		<link>http://www.seifi.org/javascript/optimizing-the-google-1-button-for-speed.html</link>
		<comments>http://www.seifi.org/javascript/optimizing-the-google-1-button-for-speed.html#comments</comments>
		<pubDate>Fri, 17 Jun 2011 20:38:43 +0000</pubDate>
		<dc:creator>Joe Seifi</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.seifi.org/?p=812</guid>
		<description><![CDATA[If you&#8217;re like most bloggers and site owners, you&#8217;ve probably already added or are planning to add the new Google +1 button to your website, to go along with the Twitter and Facebook buttons. Having implemented the +1 button I&#8217;ve found that the script takes a long time to load, and does not even load [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like most bloggers and site owners, you&#8217;ve probably already added or are planning to add the new Google +1 button to your website, to go along with the Twitter and Facebook buttons. Having implemented the +1 button I&#8217;ve found that the script takes a long time to load, and does not even load if you&#8217;re on an iPhone or iPad. This actually comes as a shock to me considering Google itself is a huge advocate of page speed improvements. The file (plusone.js) is 4 KB (before gzipping) and gets assigned a short expiration time of only 60 minutes by Google. Thankfully the script is gzipped and is only semi-minified, but it still takes a new uncached hit about 1.26 seconds to complete. Most of this time is spent in either the Blocking or Waiting stages, which might have something to do with it being served from a secure server. The decision to load the file over HTTPS by default is a bit baffling to me, especially since the handshake is historically slower. Unless sensitive information exists in the JS code which could be another interesting topic. Google has been doing some work on <a href="http://blog.chromium.org/2011/05/ssl-falsestart-performance-results.html" target="_blank">SSL FalseStart</a> in Chrome to alleviate SSL latency and it seems their goal is to eventually serve all their services securely. Plusone.js then loads a second much larger js file from plusone.google.com also over SSL which comes in at about 57 KB (before gzipping). This file tacks on another 1.17 seconds to the completion time for the +1 button.</p>
<p>After seeing how slow the Google +1 button loads and how it can actually degrade your website&#8217;s overall pageload time, I started looking around for answers. First of all, I found that I&#8217;m not the only one complaining about the issue. Numerous others have started to point out the speed issues with the +1 button. My second thought was to perhaps remove the button from the site, although considering the effect the +1 button has on your website&#8217;s ranking that would mean less love from Google. </p>
<p>So what&#8217;s a developer to do? If we keep the button on our site, overall pageload times spike. But if we remove the button, or not add it, we might lose out on a potential piece of the social voting pie which most believe affects your search performance. </p>
<p>So here are my techniques for making Google +1 button load faster, or at least not slow down your site. Interestingly enough these techniques are the same set of tips and tricks that Google&#8217;s own <a href="http://code.google.com/speed/page-speed/" target="_blank">Page Speed</a> recommends for webmasters.</p>
<h3>1) Save a step, Use Https</h3>
<p>Make sure you use the HTTPS protocol in the URL for the JavaScript source, as the original version of the button snippets given out by Google included the HTTP version http://apis.google.com/js/plusone.js which just does a redirect to https://apis.google.com/js/plusone.js This issue has since been corrected by Google when you use Google&#8217;s <a href="http://www.google.com/webmasters/+1/button/" target="_blank">+1 button generator</a> site.</p>
<h3>2) Don&#8217;t load the script on Mobile devices</h3>
<p>As stated by Google, currently the Google +1 button does not support <a href="http://www.google.com/support/forum/p/Webmasters/thread?tid=6da5296e3d7207e2" target="_blank">mobile devices</a> like the iPhone, iPod touch, iPad, or Android. This means if you have the button code on a mobile site you&#8217;re basically wasting HTTP connections and adding extra weight to your site&#8217;s throughput. To get around this fact you need to write a little utility function in JavaScript that sniffs the userAgent for unsupported devices, and only makes a call to the script if your client is not one of those devices.<br />
For example in the case of an iPhone and iPad website, you would do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> isMobileUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/iphone|ipod|ipad|android|blackberry|mini|windows\sce|palm/i</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isMobileUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//include the plusone.js code here</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>3) Load the plusone.js script asynchronously</h3>
<p>HTML 5 has introduced the ability to load scripts asynchronously allowing the rest of the page to load independently of potential bottlenecks. This feature is actually already in use for the Google Analytics code. Keep in mind that only Chrome and Firefox 3.6 and above <a href="http://www.browserscope.org/?category=network" target="_blank">support</a> the <a href="http://www.whatwg.org/specs/web-apps/current-work/#attr-script-async" target="_blank">async</a> feature at this time. But it does not hurt your non-supporting browsers in any way so it&#8217;s safe to use. Here&#8217;s the code that combines the check for unsupported mobile browsers from before to load the +1 button script asynchronously. Note that since this code is loaded asynchronously it doesn&#8217;t matter if you put the call in the footer or header.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> isMobileUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/iphone|ipod|ipad|android|blackberry|mini|windows\sce|palm/i</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isMobileUser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// create a new script element in the DOM</span>
<span style="color: #003366; font-weight: bold;">var</span> gp1script <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// set it's type attribute, not really needed in HTML 5 but just to be safe</span>
gp1script.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// set the HTML 5 attribute of async to true for the script tag</span>
gp1script.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// set the source attribute to the https version of the google pluseone code</span>
<span style="color: #006600; font-style: italic;">// change this to your own server path if you are cosidering using option 4 below</span>
gp1script.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'https://apis.google.com/js/plusone.js'</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// add the new script tag to the head or body of the page</span>
<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">||</span>document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>gp1script<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You would then place the tag where you want the +1 button to render, which since it is a proprietry tag will just be ignored if the script is not present on your page.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;g:plusone&gt;&lt;/g:plusone&gt;</pre></div></div>

<p>If you&#8217;re not comfortable with the <g> tag, you can also use an HTML 5 version to render the +1 button on your site, which uses a css class of g-plusone and sets attributes as needed. For example you can display a standard +1 button with counts using this HTML 5 tag.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;g-plusone&quot; data-size=&quot;standard&quot; data-count=&quot;true&quot;&gt;&lt;/div&gt;</pre></div></div>

<p>Note that you can also place multiple +1 buttons on a single page. For example you might have a +1 button that directs its vote to your main parent homepage like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;g:plusone href=&quot;http://www.your_tld.com/&gt;&lt;/g:plusone&gt;</pre></div></div>

<h3>4) Host the plusone.js file yourself</h3>
<p>This option has been suggested by some users, although I personally argue against it just because you&#8217;ll be responsible for continuously monitoring changes and updating your version. The big benefit here is avoiding that dreaded HTTPS server, but keep in mind the script still will make that second call to load the plusone library so you&#8217;re still not home free. Only go this route if you&#8217;re seriously considering a site improvement and are willing and capable of pushing out updates to your version of the script. I&#8217;m sure the Google +1 team is making lots of changes and adding bug fixes which you will miss out on if you forget to update the script on a daily basis. In the extreme case you could perhaps write a program that downloads the latest version of the script from Google&#8217;s servers and updates your version on a daily basis, but then again this becomes a new task to keep an eye on.</p>
<p>Hope this helps and let me know if you have other tips and or feedback regarding these ideas. For more details be sure to read the +1 button <a href="http://code.google.com/apis/+1button/" target="_blank">API</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/javascript/optimizing-the-google-1-button-for-speed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designer&#8217;s Delight &#8211; Bigg ups to SEO Rapper</title>
		<link>http://www.seifi.org/design/designers-delight-bigg-ups-to-seo-rapper.html</link>
		<comments>http://www.seifi.org/design/designers-delight-bigg-ups-to-seo-rapper.html#comments</comments>
		<pubDate>Mon, 31 Mar 2008 18:41:25 +0000</pubDate>
		<dc:creator>Joe Seifi</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.seifi.org/seo/designers-delight-bigg-ups-to-seo-rapper.html</guid>
		<description><![CDATA[The Poetic Prophet, AKA The SEO Rapper breaks down the world of designing with web standards with this amazing video. The Lyrics are simply awesome. Your site design is the first thing people see it should be reflective of you and the industry easy to look at with a nice navigation when you can’t find [...]]]></description>
			<content:encoded><![CDATA[<p>The Poetic Prophet, AKA The SEO Rapper breaks down the world of designing with web standards with this amazing video. The Lyrics are simply awesome.<br />
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/a0qMe7Z3EYg&#038;rel=0&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/a0qMe7Z3EYg&#038;rel=0&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object><br />
<span id="more-648"></span></p>
<p>Your site design is the first thing people see<br />
it should be reflective of you and the industry<br />
easy to look at with a nice navigation<br />
when you can’t find what you want it causes frustration</p>
<p>a clear Call to action to increase the temptation<br />
use appealing graphics they create motivation<br />
if you have animation<br />
use with moderation<br />
cause search engines can’t index the information</p>
<p>display the logos of all your associations<br />
highlight your contact info that’s an obligation<br />
create a clean design you can use some decoration<br />
but to try to prevent any client hesitation</p>
<p>every page that they click should provide and explanation<br />
should be easy to understand like having a conversation<br />
when you design the style go ahead and use your imagination</p>
<p>but make sure you use correct color combinations<br />
do some investigation, look at other organizations<br />
but don’t duplicate or you might face a litigation<br />
design done, congratulations but it’s time to start construction</p>
<p>follow these instructions when you move into production<br />
your photoshop functions then slice that design<br />
do your layout with divs make sure that it’s aligned<br />
please don’t use tables even though they work fine<br />
when it come to indexing they give searches a hard time</p>
<p>make it easy for the spiders to crawl what you provide<br />
remove font type, font color and font size<br />
no background colors, keep your coding real neat</p>
<p>tag your look and feel on a separate style sheet<br />
better results with xml and css<br />
now you making progress, a lil closer to success<br />
describe your doctype so the browser can relate<br />
make sure you do it great or it won’t validate</p>
<p>check in all browsers, I do it directly<br />
gotta make sure that it renders correctly<br />
some use IE, some others use Flock<br />
some use AOL, I use Firefox</p>
<p>title everything including links and images<br />
don’t use italics, use emphasis<br />
don’t use bold, please use strong<br />
if you use bold that’s old and wrong</p>
<p>when you use CSS, you page will load quicker<br />
client satisfied like they eating on a snicker<br />
they stuck on your page like you made it with a sticker<br />
and then they convert now that’s the real kicker<br />
make you a lil richer, your site a lil slicker</p>
<p>design and code right man I hope you get the picture<br />
what I’m telling you is true man it should be a scripture<br />
if it’s built right you’ll be the pick of the litter<br />
everyone will want to follow you like twitter<br />
competition will get bitter and you’ll shine like glitter</p>
<p>if you trying to grow your company will get bigger<br />
design and code right man can you get with it</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/design/designers-delight-bigg-ups-to-seo-rapper.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

