<?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>getiblog &#187; Misc</title>
	<atom:link href="http://blog.getify.com/category/misc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.getify.com</link>
	<description>javascript, performance, and ui musings</description>
	<lastBuildDate>Thu, 15 Dec 2011 17:37:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Default favicon and robots</title>
		<link>http://blog.getify.com/default-favicon-and-robots/</link>
		<comments>http://blog.getify.com/default-favicon-and-robots/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 20:29:32 +0000</pubDate>
		<dc:creator>getify</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Performance Optimization]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod-rewrite]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.getify.com/?p=792</guid>
		<description><![CDATA[This is a quick post to share something I experimented with today to figure out. Perhaps it&#8217;ll be helpful to you on your sites. I finally got fed up with the fact that, no matter what, when I have a blank new site, the browsers (and search engines) all insist on requesting a favicon.ico and [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick post to share something I experimented with today to figure out. Perhaps it&#8217;ll be helpful to you on your sites.</p>
<p>I finally got fed up with the fact that, no matter what, when I have a blank new site, the browsers (and search engines) all insist on requesting a favicon.ico and a robots.txt file. In general, I want there to be some default files for those two, when I have a blank site. Only if I really care to override do I want a custom file for either.</p>
<p>So, I created a default favicon.ico <img class="alignnone size-full wp-image-793" title="favicon" src="http://getiblog.2static.it/wp-content/uploads/2011/04/favicon.png" alt="HTML" width="16" height="16" /> (taken directly from the awesome <a href="http://www.famfamfam.com/lab/icons/silk/" rel="nofollow">FamFamFam Silk Icons set</a>) file, and a default robots.txt file:</p>
<pre class="code">
# robots.txt
#
User-agent: *
Disallow:
</pre>
<p>I uploaded these files into a central location on my server (not necessarily web accessible). Now, how do I get all my dozens of sites to use one of these files by default, if the site in question doesn&#8217;t already have that file defined? Took some experimentation, but I used some &#8220;mod_rewrite&#8221; and &#8220;Alias&#8221; trickery to get it done.</p>
<p>Here&#8217;s the relevant excerpt from my Apache configuration:</p>
<pre class="code">
Alias /default-favicon.ico /path/to/favicon.ico
Alias /default-robots.txt /path/to/robots.txt

&lt;FilesMatch "(favicon\.ico|robots\.txt)$">
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} favicon\.ico$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule .* /default-favicon.ico [L]

        RewriteCond %{REQUEST_FILENAME} robots\.txt$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule .* /default-robots.txt [L]
&lt;/FilesMatch>
</pre>
<p>That&#8217;s it! First, I use a &#8220;FilesMatch&#8221; clause to restrict my URL rewriting to only the two files I care about. Then, I use a mod-rewrite ruleset, <strong>only if the requested file isn&#8217;t found</strong>, to replace the request for &#8220;/favicon.ico&#8221; with &#8220;/default-favicon.ico&#8221; (and similarly for robots.txt). Then, notice that I have set up two &#8220;Alias&#8221; statements (&#8220;Alias&#8221; comes from the mod-alias module), which map those default-* filenames to the actual default files in the central location. Apache first processes the mod-rewrite ruleset, and then re-passes through URL parsing, where it then picks up on the Alias.</p>
<p>You may ask, why can&#8217;t you just use the mod-rewrite &#8220;RewriteRule&#8221; to map directly to the proper file location? I dunno, I wish I could. But apparently, mod-rewrite insists on paths for &#8220;RewriteRule&#8221; being relative to the DOCROOT of the site in question, rather than to the filesystem. So &#8220;/default-robots.txt&#8221; really means &#8220;/path/to/site-docroot/default-robots.txt&#8221;. The &#8220;Alias&#8221; takes care of mapping from that new bogus location to the real location of the default files. Bam. Works.</p>
<p>Hope that&#8217;s maybe helpful to some of you. No more uncacheable 404&#8242;s for favicon.ico and robots.txt. No more bogging down of my error logs. Yay.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.getify.com/default-favicon-and-robots/' addthis:title='Default favicon and robots '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.getify.com/default-favicon-and-robots/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Desktop vs. Mobile&#8230; an exploration of site delivery</title>
		<link>http://blog.getify.com/desktop-vs-mobile-exploration/</link>
		<comments>http://blog.getify.com/desktop-vs-mobile-exploration/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 03:14:09 +0000</pubDate>
		<dc:creator>getify</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Performance Optimization]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://blog.getify.com/?p=783</guid>
		<description><![CDATA[So, I&#8217;m nearing the full beta release of a desktop site/webapp I&#8217;ve been building for awhile. And one thing I realized is that the design/UX of the site works great for desktop and probably is too much for most smartphones (maybe not ipads) to really be that usable. So, it occurs to me ways that [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m nearing the full beta release of a desktop site/webapp I&#8217;ve been building for awhile. And one thing I realized is that the design/UX of the site works great for desktop and probably is too much for most smartphones (maybe not ipads) to really be that usable. So, it occurs to me ways that I could rearrange and simplify (greatly) the UX (the JS and the CSS, and some of the HTML) for a better mobile experience.</p>
<p>Figuring out how to arrange a site more vertically (for mobile smartphones) and with less complication (more touch-friendly, instead of mouse oriented) is doable, and not really the point of this post. The point of this post is, given these two different site experiences, how should I serve them to different devices?</p>
<p>It&#8217;s clear that a smartphone (~320&#215;480 type screen size) probably should get my mobile-optimized UX design. This means that there&#8217;s a whole bunch of CSS and JS for my desktop site that doesn&#8217;t need to be served to those devices (because that would be a lot of wasted bandwidth). Conversely, the mobile site will certainly have some CSS and JS that will only be for the mobile-optimized experience, and would be wasted/ignored for the desktop-optimized site.</p>
<p>But, what about the trend of &#8220;in-the-middle&#8221; devices like tablets. It&#8217;s pretty clear that a lot of them are nearly as capable as their desktop counter-parts. Capability aside, though, my primary concern is, will my desktop design UX be appropriate on a tablet? My guess is, yes, it&#8217;d be more appropriate than my slimmed-down mobile site UX design. So, for tablets, and for desktops, the default behavior should be the full site, and for the much smaller screens, the mobile design should be the default.</p>
<p>Notice I said default. I mean it. I&#8217;m only seeking to optimize the choice of the default experience. On BOTH versions of the site, a link will be present which will let someone manually toggle to change to the other experience. If my guess or default is wrong, the user will be able to switch. And do so with a cookie (if possible), so that the switch is remembered from then on.</p>
<p>So, what it comes down to is, I&#8217;m basically wanting to fork the two site versions based on screen dimensions (and to some extent, PPI resolution). The two site versions have some overlap, but it seems like there&#8217;s enough that&#8217;s unique to each, that one is not really a sub-set or super-set of the other. And for the sake of this discussion, let&#8217;s just assume that my desktop site is 300k (including ALL resources), my mobile site is 50k, and the overlap between the two is about 15k (content the same, some JS the same, a few images the same, etc).</p>
<p>So, what are my options?</p>
<ol>
<li>Full UA sniffing on the server, serving only one version of the site (300k) or the other (50k)</li>
<li>Serve a big combined site (~335k) with content/css/js for both sites all being sent, and use CSS3 media-queries to simply show/hide various bits of content from each type of device/computer as screen geometry dictates. (AKA, &#8220;responsive design&#8221;, &#8220;responsive &#8230;&#8221;, etc)</li>
<li>JavaScript logic served at first page-load, to determine screen geometry, and then take appropriate action to load the appropriate site content/css/js. (300k or 50k)</li>
</ol>
<h3>Pros/Cons</h3>
<p>For (1), the obvious con is having to maintain a full UA sniffing. Why? because the server doesn&#8217;t know the screen size (not in the UA string). So, I&#8217;d have to construct (or use existing) UA sniffing logic for all the various mobile browsers&#8230; and moreover, I&#8217;d have to account for tablets in that checking, too. If the iPad were the only tablet, that wouldn&#8217;t be so bad. But there&#8217;s now dozens of different tablet models on the near horizon. That means lots of complicated UA sniffing to correctly identify each one/type. </p>
<p>And, it means committing to keeping up that UA sniffing for all new types of &#8220;in-the-middle&#8221; devices, making decisions individually based on each. For instance, is a 7&#8243; device big enough? What about a 5&#8243; or 6&#8243; version of the same device (will it&#8217;s UA even be different)? What about the 9&#8243; or 10&#8243; versions? That&#8217;s going to mean LOTS of testing and maintenance overhead to get that right and keep it right going forward. Ugh.</p>
<p>But the big pro is, if the UA sniff (aka &#8220;guess&#8221;) is correct, the user only downloads exactly what&#8217;s necessary for their device. Mobile users get only 50k, and Desktop or &#8220;in-the-middle&#8221; users only get 300k.</p>
<p>For (2), the obvious con is the larger size of the full combined set of resources (335k). For a desktop, that&#8217;s about 12% more than it really needs. For mobile, though, that&#8217;s about 570% more than it really needs. Are there tricks to reduce the unnecessary loading? Sure. But the point is, a lot of HTML, and a lot of JS, and at least some CSS, will get loaded unnecessarily, especially in the mobile case, where bandwidth is likely to be more of a limiting factor. This just doesn&#8217;t feel like the right solution.</p>
<p>Another con is that media queries have good, but not universal, support. Namely, no IE supports it until IE9. That means all mobile IE&#8217;s are left out of the party. Unless you use something like <a href="https://github.com/scottjehl/Respond">Respond</a> from <a href="http://twitter.com/scottjehl">Scott Jehl</a>, which patches IE6-8 (and probably others) for media-query support, specifically for width/height geometry. But that adds a little extra weight (3.5k before gzip). So, it&#8217;s something to consider.</p>
<p>Of course, clearly the huge pro is that you avoid all UA sniffing and all the terrible junk that comes along with it.</p>
<p>For (3), the obvious con is that for non-JavaScript (like mobile devices that don&#8217;t have JS enabled), they&#8217;d basically be totally left out. Of course, a &lt;noscript> tag could probably use some redirect (meta tag or manual &lt;a> link) to give such a user a way forward. That&#8217;s workable, but it&#8217;s less than ideal. Then again, do I even care if my non-JS visitors can get to my site? For some sites, they don&#8217;t care. For me, however, I do care. I probably need a non-JS solution.</p>
<p>The pro is, like with (1), only one version of the site is served. And even more likely to be correct than in (1), with a lot less work/maintenance.</p>
<p>Bottom line, none of these 3 options is really great. I&#8217;m sure a lot of sites employ something like them for this type of functionality. But they all seem like they&#8217;re sub-optimal, for various reasons.</p>
<h3>So what should I do?</h3>
<p>Let me just say up front, I&#8217;ve not fully decided, nor do I really know for sure the best answer. This post is basically just to explain my experimental/explorative thoughts on the topic, and to solicit feedback from the community on what they think.</p>
<p>I got to thinking, what if CSS3 media queries could be used to do the checking on the screen&#8217;s size, and without any JavaScript, set a cookie that would let the server know which site version to serve, on the next refresh.</p>
<p>So, here&#8217;s how I might accomplish that.</p>
<ol>
<li>On first request to server, check if a cookie is set for site version. If so, respect it, and deliver the proper site directly. If not, use basic UA sniffing to identify mobile webkit and a few other well known mobile browsers. Don&#8217;t worry at all about device type, just identify common mobile browsers. If it seems like a mobile device from this coarse guess, serve up a &#8220;check&#8221; page. If not, assume the best, and serve up the full desktop site. Again, set a cookie for next time.</li>
<li>In the &#8220;check&#8221; page, have a few bits of inline &lt;style>, using CSS3 media queries, to do the screen geometrics testing. In each block, have it make a background-image request, with a particular parameter in it, indicating to the server the screen size category. The server then sets a cookie appropriately. In theory, only one of these two requests should go out, and if cookies are enabled, then it should identify it fairly reliably.</li>
<li>Include a meta-refresh tag, and JavaScript redirect (just in case), and lastly an &lt;a> link for the user to follow to refresh the page. If the cookie setting worked, this refresh should now serve the appropriate version of the site.</li>
</ol>
<h3>Gotchas</h3>
<p>This idea is not perfect, by any means. There&#8217;s plenty of pitfalls. </p>
<p>For instance, if the browser doesn&#8217;t support cookies, this won&#8217;t work. Then again, for *my* site, I think I want to require cookies, so perhaps that&#8217;s not a deal breaker. I could detect cookie-setting failure, and display a message to the user that the site requires cookies to proceed. Or I could just default to either version of the site if the cookie setting failed, and just let the user figure out that it&#8217;s not gonna work as expected, in some respects.</p>
<p>Also, there&#8217;s the case where on mobile, there was a redirect that happened. This is an unfortunate extra delay/bandwidth/etc. But, I&#8217;m hoping that this refresh/redirect that occurs is less penalty than shoving 570% too much HTML/JS down the pipe on the first view.</p>
<p>What about if the browser doesn&#8217;t request background-images? Perhaps the CSS could also use content:after to create an &lt;img> tag to force the request.</p>
<p>How do I force the meta-refresh/JS redirect/link clicking to &#8220;wait&#8221; for the cookie setting to occur after the background-image response comes back? For JS, this is easy, just poll for the image to finish loading. For the meta-refresh and the link clicking, not so much. There&#8217;s a few quirky ideas I could explore, but I&#8217;m not really entirely certain how to force this part to work correctly. But I&#8217;m also not convinced that it has no solution. And remember, it might only fail if the user doesn&#8217;t have JS&#8230; so as a fallback, the meta and links could always force one version (regardless of cookie), whereas the JS waits for the cookie, and does a refresh.</p>
<p>I&#8217;m sure there are other pitfalls I&#8217;m not realizing yet. I&#8217;d love to get some feedback from you, the reader. Am I crazy? Is this over architecting? Does this have promise? Will I fail?</p>
<p>Please, though, keep in mind a few things when providing feedback:</p>
<ol>
<li>Having already built the full site, and at least sketched out what the mobile site will look like, radical/significant changes to the design of either are not only impractical, but irrelevant. Please don&#8217;t comment if this is your suggestion. The spirit of what I&#8217;m asking is, making the best with my current situation, which is basically two site versions.</li>
<li>UA sniffing is, in my opinion, generally evil. I want to avoid it as much as possible. I only introduce it in the above idea because it helps the &#8220;guess&#8221; and reduces to some extent how many people get the &#8220;check&#8221; page (and its delays, thereof). And, of course, the simple basic UA sniffing I&#8217;m talking about is orders of magnitude easier to write/maintain compared to full-blown UA sniffing.</li>
<li>I am forking primarily based on my intended UX for small screens vs. big screens. I&#8217;m not forking for JS vs. non-JS, or because of low-powered/incapable devices, etc. I&#8217;m only forking based on screen geometry, because of its direct correlation to usability of layout.</li>
</ol>
<p>That&#8217;s it. I hope to hear some great ideas. Thanks!</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.getify.com/desktop-vs-mobile-exploration/' addthis:title='Desktop vs. Mobile&#8230; an exploration of site delivery '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.getify.com/desktop-vs-mobile-exploration/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>LABjs and W3C&#8230; brief update</title>
		<link>http://blog.getify.com/labjs-w3c-brief-update/</link>
		<comments>http://blog.getify.com/labjs-w3c-brief-update/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 18:29:04 +0000</pubDate>
		<dc:creator>getify</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Performance Optimization]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[labjs]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.getify.com/?p=612</guid>
		<description><![CDATA[Just wanted to post a quick update to the ongoing discussion on where things currently stand with LABjs and the breaking changes in Mozilla and Webkit trunks precipitated by some incomplete wording in W3C spec. A really long thread on W3C public-html list has been brewing over the past few weeks regarding the fact that [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to post a quick update to <a href="http://blog.getify.com/2010/10/mozilla-labjs-part-2/">the ongoing discussion</a> on where things currently stand with LABjs and the breaking changes in Mozilla and Webkit trunks precipitated by some incomplete wording in W3C spec.</p>
<p>A <a href="http://lists.w3.org/Archives/Public/public-html/2010Oct/0377.html">really long thread on W3C public-html list</a> has been brewing over the past few weeks regarding the fact that the W3C spec does not adequately provide a way for web authors to handle the use-case of parallel-load/execute-in-order, which is important for dynamic script loaders (like LABjs).</p>
<h3>Other options</h3>
<p>A variety of different view points and alternative ways to address the issue have been thrown around. Some of the people on the list feel that this use case is not important to solve because authors can just concat all their scripts together. This is obviously short-sighted given many previous discussions that demonstrate the performance benefits of parallel loading and independent caching.</p>
<p>Other members on this list feel the best way to handle the use-case is to create some sort of API for authors to directly do the &#8220;preloading&#8221; trick. This trick essentially relies on loading all scripts in parallel into the cache but <strong>not</strong> executing them (using several possible tricks), and then once they&#8217;re all in cache, re-requesting them with proper &lt;script> nodes to immediately pull them from cache and execute them.</p>
<p>The fact that LABjs invented this trick (using the fake mime-type &lt;script type=&#8217;script/cache&#8217;>) for IE, Webkit, and Chrome browsers does not mean I think it&#8217;s the best way &#8212; in fact, it&#8217;s an ugly and error-prone approach to the use-case, and I always hoped I could eventually deprecate that once the spec reflected a better solution.</p>
<p>One major gotcha to &#8220;preloading&#8221; is that if any resource in the &#8220;preloading&#8221; queue doesn&#8217;t send out proper caching headers, not only will that resource end up being requested twice, but the assumption of immediate execution from cache will fail and thus dependencies will be in a race condition. Some estimates have suggested that as much as 70% of all script resources on the web are served without proper caching headers &#8212; a scary number in its own right, but also quite illustrative of the pitfall to this technique.</p>
<p>So, the part of the crowd that thinks the solution lies in &lt;link rel=prefetch>, or `new Image().src=&#8230;`, or <a href="http://www.phpied.com/preload-then-execute/">Stoyan Stefanov&#8217;s &lt;object> preloading technique</a>, or&#8230; those options are all, in my opinion, missing the bigger picture of how &#8220;preloading&#8221; can really fall over for this use-case if caching is not correct. Moreover, they are all more complicated to implement, which makes script loaders like LABjs more complicated than they should have to be.</p>
<h3>The Proposal</h3>
<p>So, Henri (from Mozilla) and I have been discussing a simple proposal to amend the W3C spec to cover the use case in a straightforward way that avoids such clumsiness and pitfalls.</p>
<p>In a nutshell, the idea is to extend the spec so that the `async` property is present and its value (true/false) is respected, both for &lt;script> tags in the HMTL markup and for script-elements that are injected dynamically (currently, the spec says nothing about `async` for injected elements). If an author (like the LABjs tool) wanted to inject scripts to have them load in parallel, but have their order preserved, they could simply set `async=false`. If the author instead wanted the &#8220;execute as soon as possible&#8221; behavior because there were no dependencies in the queue of loading scripts, they could set `async=true`.</p>
<p>Ultimately, this actually makes the spec more consistent and symmetrical, given that we&#8217;re making `async` work pretty much the same for injected script elements as it already does for markup &lt;script tags.</p>
<p>This proposal idea is still forming, but that&#8217;s the main idea. Several people on the list have suggested support for the idea. Others however are not in favor of it, and they are the main voices suggesting myriad other more complex solutions (like a `document.executeScripts` API, for instance). </p>
<p>So, the discussion definitely needs to continue and find some consensus. Then, we need to advocate for W3C to adopt it, and then we need to really rally to get all the browsers (especially Webkit and IE) to agree to implement the spec. All of that needs to happen before the next major release of Webkit or FF, or LABjs is going to basically fail.</p>
<p>As you can see, we&#8217;re far from out of the woods yet. I call on you the community to help join the effort. The more people we can get behind a proposal, the more of a chance that something might happen before the inevitable bulldozer of &#8220;progress&#8221; demolishes what LABjs tried to build.</p>
<h3>Next Steps</h3>
<p>Because the aforementioned email thread is now quite long and complicated to digest, I am going to be moving the discussion over to a simple Wiki page in WHATWG. I encourage you to try and read some of the recent (dozen or so, probably) messages on that email thread to get up to speed, and then join the effort in continuing the discussion toward consensus over on the Wiki. I will post an update here as soon as that page is up.</p>
<h4>Update</h4>
<p>Here&#8217;s the <a href="http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order">Wiki page on WHATWG</a> to continue the discussion.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.getify.com/labjs-w3c-brief-update/' addthis:title='LABjs and W3C&#8230; brief update '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.getify.com/labjs-w3c-brief-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FF4, script loaders, and order preservation</title>
		<link>http://blog.getify.com/ff4-script-loaders-and-order-preservation/</link>
		<comments>http://blog.getify.com/ff4-script-loaders-and-order-preservation/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 20:26:12 +0000</pubDate>
		<dc:creator>getify</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[FF4]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://blog.getify.com/?p=566</guid>
		<description><![CDATA[This has certainly been an eventful day so far. I woke up this morning to this ominous tweet from @3rdEden. I thought surely I was reading that wrong, but I scrambled to try and install a copy of FF4 nightly (aka &#8220;minefield&#8221;) to try and confirm. Sadly, a few minutes later, I confirmed that it [...]]]></description>
			<content:encoded><![CDATA[<p>This has certainly been an eventful day so far. I woke up this morning to <a href="http://twitter.com/#!/3rdEden/status/26439629963">this ominous tweet</a> from <a href="http://twitter.com/3rdEden">@3rdEden</a>. I thought surely I was reading that wrong, but I scrambled to try and install a copy of FF4 nightly (aka &#8220;minefield&#8221;) to try and confirm. Sadly, a few minutes later, I confirmed that it was in fact true: FF was no longer preserving execution order (as insertion order) on dynamically injected &lt;script> nodes.</p>
<p>Then I thought to myself: surely this is just a regression bug&#8230; FF has <strong>always</strong> preserved execution order on &lt;script> tags (hint: so has Opera). Also, the recent support for &#8220;async&#8221; and &#8220;defer&#8221; properties was specifically designed around unpinning scripts from execution order and onload dependency blocking, so the natural assumption is that the desired and correct behavior for a &#8220;naked&#8221; &lt;script> tag without such attributes would be to continue as it always has in FF: insertion-order execution.</p>
<p>So I figured I&#8217;d just file a bug with Mozilla and surely they&#8217;d just fix that little hiccup. Then the bombshell&#8230; I found <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=591981">the bug report that changes everything</a>. In short, Mozilla <strong><em>intentionally</em></strong> removed support for preserving insertion-order execution of inserted scripts. Not an accidental regression bug in a nightly release, but a landmark and fundamental feature change they&#8217;ve made to the browser. And no, they didn&#8217;t engage anyone like me (or others that are highly invested in this area) in any discussions ahead of time to examine the impact such a change might have &#8212; they just made the change. Bam.</p>
<h3>Why do we care?</h3>
<p>Let&#8217;s back up. Why do we care that Mozilla is changing this behavior with the upcoming FF4? The reason I care, and you should too, is because it severely cripples script loaders (like <a href="http://labjs.com">LABjs</a>). If you&#8217;re not aware, the affected script loading tricks/tactics are in several different loaders (including the &#8220;Order&#8221; plugin for <a href="http://requirejs.org">RequireJS</a>), and LABjs is in use on a number of high profile sites, including the <a href="http://engineering.twitter.com/2010/09/tech-behind-new-twittercom.html">New Twitter</a>, <a href="http://zappos.com">Zappos</a>, and <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Before I go any further, let me explain exactly under what circumstances and how this change by Mozilla is going to change things for the script loader landscape, especially for LABjs.</p>
<p><strong>The specific use case that is affected is: dynamic script loading of multiple scripts (one or more of which are from remote domains) which have execution order dependencies so their order must be preserved.</strong></p>
<p>If you are only loading local scripts, or if you are loading scripts in parallel and you don&#8217;t care at all about their execution order (they are unrelated entirely), or if you are only loading <strong>one</strong> script, then you are probably not affected. So move along. Well, unless you use another site that does, and that site will now fail in FF4. Then I guess you should care. <img src='http://getiblog.2static.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Why is this relevant to LABjs?</h3>
<p>So, let me try to explain very simple boiled down why LABjs relied on the previous behavior in FF, and thus what the effect will now be in FF4 going forward.</p>
<p>LABjs&#8217; main goal is to allow you to load any script, from any location (local or remote), in <strong>parallel</strong> (for better performance), but maintain/enforce execution order if you need to because of dependencies. What does this mean? It means that LABjs needs to be able to download all scripts in parallel, but be in control of when/how those scripts execute. Because one of the later scripts might download quicker than the earlier scripts&#8230; but we need the later script to &#8220;wait&#8221; for the earlier script to finish downloading and run.</p>
<p>When you use &lt;script> tags in your HTML, you already get this correct behavior by default. But LABjs is designed to replace those &lt;script> tags with $LAB API calls that load the scripts dynamically and in parallel, which achieves (in some cases, much) better performance than just &lt;script> tags alone.</p>
<p>Unfortunately, not all browsers work the same way with respect to the loading and executing of such &lt;script> tags. Prior to today, FF and Opera operated like we want, which is that you can inject as many &lt;script> tags as you want, and the browser would make sure they download in parallel in whatever order, but will make sure they execute in proper (insertion) order. This is ideal and desired behavior from a script-loader (and performance) point of view. But the other browsers didn&#8217;t play so nicely, so this technique was only reliable in FF and Opera.</p>
<p>In IE, Safari, and Chrome, if you inject two &lt;script> tags dynamically, they <strong>may not</strong> execute in insertion order. Which means that if we want to download them in parallel but control their order, we have to find some other trick to do that. So, for those 3 browser families, I devised the &#8220;text/cache&#8221; preloading trick. </p>
<p>Put simply, in those 3 browser families, you can inject a &lt;script> tag into the page with a fake `type` attribute of something like &#8220;text/cache&#8221; (or &#8220;foo/bar&#8221;, etc). Those browsers will download that script, <strong>and</strong> will fire the `onload` handler to let you know the script finished loading, <strong>but they will not execute the script</strong> since the type is not recognized. So, the &#8220;preloading&#8221; trick for these browsers is to download all scripts in parallel (caching them in the browser cache) using this fake type attribute, and then go back and re-insert new &lt;script> tags in the proper desired execution order, using the correct &#8220;text/script&#8221; type. The script will be recalled from cache immediately and executed, and then the next script can immediately be processed the same way, and so on.</p>
<h3>Ugly</h3>
<p>Is that trick pretty? Absolutely not. But it works. It works <strong>really</strong> well, by exploiting parallel downloading for sometimes HUGE performance gains. And yet it keeps a key feature of LABjs: preserving execution order if dependencies require it.</p>
<p>The problem is, this preloading &#8220;text/cache&#8221; trick <strong>does not work</strong> in FF or Opera! They will refuse to download a resource if the declared type of that resource is not something they recognize ahead of time. But take heart, because FF and Opera preserve execution order, so for those browser families, we just insert the &lt;script> tags all at once, and rely on the browser to maintain the execution order.</p>
<p>So, that&#8217;s the uneasy but workable tension that LABjs has operated under for the last year and a half. It uses one trick for some browsers, and another behavior for other browsers, and between those two tricks, &#8220;preloading&#8221; (parallel loading) and execution order enforcement are possible. LABjs hides all the ugly details of how to do that under the covers and keeps the usage pretty simple and straightforward.</p>
<p>This balance of performance and dependency preservation was never (to my knowledge) achieved in a script loader before LABjs cross-browser, and is a big reason why LABjs is now powering many big sites like Twitter &#8212; performance and features are the ideal combination.</p>
<h3>The fly in the ointment</h3>
<p>By Mozilla deciding that FF will no longer respect/enforce insertion execution order, they have now killed the only &#8220;trick&#8221; which worked for FF family of browsers to be able to parallel load <strong>dynamic &lt;script> tags</strong> but ensure execution order for dependencies. It&#8217;s important to note that &lt;script> tags that appear in plain HTML source, even in the new FF4 world, <strong>do</strong> exhibit the desired behavior &#8212; what&#8217;s changed is that dynamically inserted &lt;script> tags no longer do. BIG bummer.</p>
<p><strong>What are the options for LABjs at this point?</strong></p>
<ol>
<li>The most likely, but severely distasteful, option is that LABjs can be patched to detect that it is running inside of FF4 (only), and it can simply disable all &#8220;preloading&#8221;. What this will mean is that sites relying on LABjs running in FF4 will <strong>load AND execute</strong> completely <strong>serially</strong> (that is, one script at a time). This means that each of 3 scripts on a site will load one at a time and then execute, then the next script downloaded, executed, then&#8230; You can see why the performance side of this equation is going to lose out <strong>BIG TIME</strong> in that respect. LABjs will still work, but <strong>all</strong> of the benefits performance-wise will be completely lost.
<p><strong>In fact, LABjs in FF4 will actually run LESS PERFORMANT than if the site just used regular script tags.</strong> Of course, sites will probably still want to keep using LABjs to speed up browsing for visitors in all other browsers (including especially IE&#8217;s), but they&#8217;ll have to face the sad fact that their FF4 visitors will see a greatly reduced performance profile. Pretty sad for such a cutting edge browser to actually cause much worse performance.</li>
<li>I could patch LABjs to, in FF4+ only, use cross-domain XHR to &#8220;preload&#8221; remote scripts. However, the problem this presents is that the way FF has implemented cross-domain XHR, it requires the remote server to opt in with special response headers, which means that ALL servers, especially CDN&#8217;s, will have to be patched to start serving such headers, before the cross-domain XHR option will be viable. That&#8217;s not going to happen any time soon, even if we start now, and it&#8217;s certainly not going to happen before FF4 releases final.
<li>We can petition Mozilla to reconsider and restore this behavior to FF4 before its launch. I call on the community to help me in this respect. <del>In fact, I&#8217;ll assert that I strongly feel that Mozilla owes more responsible behavior to the community &#8212; they should have engaged us in a discussion of such features before making such a fundamental and backwards-incompatible change.</del> A serious dialog needs to be had regarding all the key players and compromises be made that will not leave script loaders (and the many big sites who rely on them) out in the cold. <em><strong>Edit: I apologize if the above language is inflammatory or offensive. I&#8217;m obviously distressed. And I wish I&#8217;d known about this so I could have helped inform Mozilla on the larger side-effects of the change as implemented.</strong></em></li>
<li>All browsers need to sit down and come up with and agree on a consistent behavior for the dynamic loading of resources (especially .js files) that takes performance concerns as well as dependency enforcement into account. If they all agreed on a single standard, LABjs (and other script loaders) could be drastically simplified or almost made entirely moot. This would be the best option. Script loaders like LABjs only exist right now because the browsers haven&#8217;t yet agreed on a consistent and performance-savvy way to handle such functionality. I hope one day they are unnecessary, but that&#8217;s going to require a lot of uncommon agreement/cooperation between the browsers.
<p>I have petitioned for such discussions to happen for well over a year. There&#8217;ve been a few emails exchanged among a few players in this space, but nothing has even begun to be dealt with to finally solve these issues.</li>
</ol>
<p><strong>I hereby renew my call for actual standards to specifically deal with how resources are dynamically loaded, including all adjacent functionality like execution order, onload event notifications, etc, and for ALL browsers to immediately agree to such standards and to publish backward patches.</strong></p>
<p>Until that happens, performance-oriented script loaders like LABjs will still be a necessary evil in this web world, and we&#8217;ll continue to be at risk of browser nightly releases casually removing key features/behavior and throwing the whole script loader world into chaos.</p>
<p>I of course will keep you, the community, aware of the status of this issue as it moves forward. I sincerely hope that Mozilla will reconsider this situation and will engage in discussions to find a solution. I ask you, the community, to help me surface to Mozilla why that is such a critical conversation that needs to happen ASAP.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.getify.com/ff4-script-loaders-and-order-preservation/' addthis:title='FF4, script loaders, and order preservation '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.getify.com/ff4-script-loaders-and-order-preservation/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>SEO that Ajax&#8230; Ajax that SEO</title>
		<link>http://blog.getify.com/seo-that-ajax/</link>
		<comments>http://blog.getify.com/seo-that-ajax/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 17:49:14 +0000</pubDate>
		<dc:creator>getify</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://blog.getify.com/?p=540</guid>
		<description><![CDATA[Recently, I&#8217;ve had several conversations over twitter and IM with various people, including James Bowden just today, about the topic of making pages still function even if JavaScript is not present/enabled. It was Alex Sexton&#8217;s post on preventing FOUC the accessible way which kind of sparked the rabbit trail I want to discuss in this [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve had several conversations over twitter and IM with various people, including <a href="http://twitter.com/jalbertbowdenii">James Bowden</a> just today, about the topic of making pages still function even if JavaScript is not present/enabled. It was <a href="http://twitter.com/slexaxton">Alex Sexton&#8217;s</a> post on <a href="http://alexsexton.com/?p=147">preventing FOUC the accessible way</a> which kind of sparked the rabbit trail I want to discuss in this post: how JavaScript, non-JavaScript, and SEO interplay.</p>
<h3>SEO != Accessibility</h3>
<p>The first thing to get straight is that many people conflate the ideas of Accessibility (that is, strictly that <strong>people</strong> with disabilities can still access your content) and SEO (that is, strictly that a search engine crawler bot can access and index your content). We&#8217;ll talk in just a moment about how they are somewhat related, but let&#8217;s first dispel the myth that they are one-in-the-same.</p>
<p>SEO means that I am actively trying to surface certain important pieces of information in my page to catch the radar of the search engine bot, so that later when someone is doing keyword searching, they will more likely see my page as relevant to that search query. In an odd sense, SEO is actually <em>Accessibility for future search users</em>. But it&#8217;s not really Accessibility in the sense of making my page easily and functionally interactable for someone with disabilities like low-vision or keyboard-only input.</p>
<p>Here&#8217;s why it&#8217;s important to distinguish between these two concepts: <strong>Accessibility is a <em>must-have</em> for anyone who actually wants to be a good net-citizen to their fellow community members. SEO is an <em>optional</em> improvement to your content, and only really necessary if you actually <em>have content</em> that should be indexed.</strong></p>
<p>For instance, Gmail needs to be intensely &#8220;Accessible&#8221; (whether it is or not is the subject of other blog posts by people more knowledgeable than I am). But Gmail doesn&#8217;t particularly need to be SEO indexable (except for the landing and marketing pages) because it&#8217;s much more a web application than a web site, and the <em>content</em> that Gmail displays is largely private content &#8212; that is, my private email inbox. I definitely don&#8217;t want that content crawled and appearing in the Google search index!</p>
<h3>SEO ~= Accessibility</h3>
<p>Here&#8217;s why it&#8217;s so common to relate the two concepts: <em>often</em> times, the process of making a page Accessible (at least, the basics) is very similar to making a page SEO indexable. But notice I said <em>often</em> &#8212; the two ideas are definitely related, but there&#8217;s a whole bunch of SEO that has nothing to do with Accessibility, and vice versa.</p>
<p>For instance: <strong>alt</strong> tags on &lt;img> elements. The alt-tag is supposed to define a textual replacement for the image. If I have a picture of two boys playing baseball, I can describe that image by saying &#8220;Boys at a baseball game&#8221; in the <strong>alt</strong> tag. This will serve a couple of purposes.</p>
<p>First and foremost, the text will appear in the browser if the image cannot be rendered (for whatever reason). Secondly but almost equally important, if a user is browsing your site with say a Screen Reader because they are blind, the Screen Reader can describe the picture only based on what text you put in that <strong>alt</strong> tag. So, the primary goal then of the <strong>alt</strong> tag is for Accessibility reasons.</p>
<p>But <strong>alt</strong> also has (rightly or wrongly) some SEO implications. SEO bots also have a very hard time understanding a picture without some help explaining it, so if you describe the picture in the <strong>alt</strong> tag, the SEO engine has a better chance of understanding and properly indexing your page. This is a bonus though &#8212; not the primary goal.</p>
<p>Another topic which has both SEO and Accessibility facets is &#8220;semantic markup&#8221;. Semantic markup means structuring your document in a way that makes it easier for anything parsing it to understand your intent (whether that is an SEO bot or a Screen Reader). For instance: wrapping paragraph text in a &lt;p> (&#8220;paragraph&#8221;) tag or describing a list of items using an &lt;ol> (&#8220;ordered list&#8221;) tag. HTML5 has a whole slew of new tags designed to make the process of &#8220;marking up&#8221; your document with tag structure more semantic and meaningful. This will not only help search engines but it will also help your disability visitors.</p>
<h3>SEO &lt;> Accessibilty</h3>
<p>On the other hand, there are many techniques which are quite unique to each discipline and really have little-to-no overlap with the other. For instance, an SEO expert may very well put an &lt;h1> tag in the middle of some paragraph text and use CSS to make sure it&#8217;s still styled like the surrounding text content. Why? Because they know that a search engine may pick up on that keyword more easily if it the structure of the document indicates it&#8217;s importance, regardless of visual presentation.</p>
<p>But that has absolutely nothing to do with Accessibility, and is quite possibly even counter to the goals of such. A Screen Reader might &#8220;render&#8221; that text confusingly when verbally transcribing it: &#8220;The lazy brown <strong>Section Title!</strong> dog slept the afternoon away.&#8221;</p>
<p>By the same token, using <a href="http://www.w3.org/TR/wai-aria/">WAI-ARIA</a> (the modern RIA/Ajax extensions to basic Accessibility techniques), you might markup a tag with all kinds of extra attributes to help the Screen Reader out, but which would have no meaning or usefulness to an SEO bot at all (and may very well even confuse it if you&#8217;re not careful).</p>
<h3>SEO &#8211; JavaScript</h3>
<p>Here&#8217;s where the conversation usually gets a lot more muddled. Years ago, web developers had a non-trivial amount of users to consider who were surfing the web with browsers that were partially or completely incapable of dealing with JavaScript (the text-based Lynx browser, for instance). Today, most studies show that &lt;2% of <em>people</em> surf without the benefit of JavaScript. For a lot of developers, we&#8217;re now getting into the territory where supporting a &#8220;fallback&#8221; (non-JavaScript) version of the page or site may become non-pragmatic compared to the relative percentage of viewership.</p>
<p>Not everyone feels that way, though, and so a lot of sites still, to greater or lesser extents, try to maintain some sort of non-JavaScript functionality. For instance, you may have a contact form with the web 1.0 submit button, and then with JavaScript you modify that form at page run-time so that it instead submits via Ajax. This is a reasonable first pass at &#8220;progressive enhancement&#8221; (or, depending on your mindset, &#8220;graceful degradation&#8221;).</p>
<p>The unfortunate and confusing part is that developers (and especially business types like bosses) often times combine their efforts for SEO, Accessibility, and non-JavaScript fallback all into one effort. The primary reason for the conflation is this: a non-JavaScript capable browser in many basic ways seems the same as an SEO bot (which can&#8217;t, for the most part, do anything JavaScript) as well as a disability-challenged visitor who must rely on a Screen Reader or other Accessibility tools for input and output. It seems on the surface that it&#8217;s easier to just lump all 3 into the same category, like the Dr. Seuss &#8220;Haves&#8221; and &#8220;Have Nots&#8221;.</p>
<p>While this may seem like a good pragmatic shortcut, as I&#8217;ve shown so far, this leads to a lot of confusion, wrong practice, and missed opportunity. The result is that you end up getting all 3 practices wrong in some way or another. <strong>You should have a separate and robust strategy for each: Accessibility, SEO, and non-JavaScript</strong> (if that demographic is important to you).</p>
<h3>Ajax = SEO confusion</h3>
<p>There are many people out there who feel that Ajax&#8217;ifying your page (that is, making it so the page content can change/update without full page refreshes) automatically puts you at odds with SEO and with Accessibility. But this is usually where the confusion takes over and we lose sight of some important points:</p>
<ol>
<li><strong>Not all content needs to be SEO indexed.</strong> Understand that you can SEO the portions of your site that are important for search results, but not SEO the stuff that&#8217;s not important. For instance, if you have a weather widget on your page, the weather content inside that widget is not SEO relevant, so don&#8217;t worry about making it SEO friendly (whether it&#8217;s Ajax or not).
<p><a href="http://digg.com">Digg</a> has a bunch of different links to various content around the web. In some respects, it&#8217;s kind of like a search engine itself. I&#8217;d submit to you that the list of links on the Digg homepage is not really SEO relevant, because this page itself is not providing any relevant additional info. It&#8217;s just a link farm to other content on the web. Of course, Google certainly crawls the links found on Digg and indexes <em>that</em> content, but I rarely see that Digg itself shows up as the source for content when I do a Google search &#8212; I just see the content itself. For Digg, SEO&#8217;ing their Ajax is probably not as relevant.</p>
<p><a href="http://twitter.com">Twitter</a> and <a href="http://facebook.com">Facebook</a> on the other hand have a lot of original content, and so it absolutely makes sense for them to make their pages and content as SEO friendly as possible. To the extent that they have Ajax mixed in, they will need to take notice of how Ajax <em>may</em> affect their SEO.
</li>
<li><strong>Just because your page has Ajax on it doesn&#8217;t mean that it&#8217;s not SEO indexable.</strong> For instance, for Accessibility (and non-JavaScript) reasons, it&#8217;s probably a good idea for the &#8220;first page-view&#8221; (that is, when a user first pulls up your URL or when they do a full page refresh) to send out all the relevant content in the initial HTML. This content is then perfectly indexable by an SEO crawler without any JavaScript.
<p><strong>Just because you then add Ajax updating of that content to your page to help users save page refreshes does NOT mean that you&#8217;ve lost SEO friendliness of your content.</strong></p>
<p>If however you send out an empty page with no content and build everything on the fly with JavaScript and Ajax, then you definitely are limiting the ability of a search engine crawler to see that content.
</li>
</ol>
<h3>SEO + Ajax</h3>
<p>The confusion around these points is so strong and prevalent, Google recently published a set of <a href="http://code.google.com/web/ajaxcrawling/docs/getting-started.html">suggested practices for making an Ajax-enabled page crawlable</a>, to give you a way to achieve SEO with your Ajax goodness.</p>
<p>Basically, Google recognizes that it&#8217;s common for the complex Ajax-driven states of a site/application to be tracked (and thus bookmarkable and history-capable) by saving those &#8220;states&#8221; into the hash portion of the URL, like this:  http://somedomain.tld/something/#state1&#038;state2. However, everything from the # to the end of the URL is only known and accessible by the browser and is not something a server request sees, so the Google crawler can&#8217;t make such a request and expect that your server itself will return any relevant content for that state (because your server won&#8217;t ever see the # portion of the URL).</p>
<p>So, Google is suggesting that for their crawler (without the benefit of JavaScript or Ajax) to index all these Ajax driven states, you need to <em>help them out</em> (does that sound like SEO to you!?) and add additional functionality to your site/app that let&#8217;s these states be indexable.</p>
<p>The specifics of the technique are not important to this post (read the link provided if you are interested). In addition, I&#8217;ve got my own issues with their suggested practices, so that&#8217;s probably stuff for its own post at some point. But bottom line, you can take some extra steps on your server back-end to make all those Ajax driven states individually indexable.</p>
<h3>SEO.split(&#8220;.&#8221;)</h3>
<p>Here&#8217;s the big confusion that we need to unravel. Google has wrapped up this topic into a discussion of Ajax, which makes everyone who has any Ajax on their page scared that they will lose all their SEO if they don&#8217;t conform to Google&#8217;s suggested practices. <strong>This is just plainly not true.</strong> And it&#8217;s creating a lot of wrong practice by trying to have everyone conform to something that is only relevant to a certain subsection of sites/applications on the web.</p>
<p>This may seem like it&#8217;s related to Ajax, but I suggest to you it&#8217;s not really directly about Ajax. Google is actually saying that individual pieces of information can be individually indexed, <strong>if that <em>makes sense</em> for your site</strong>. In other words, the individual pieces of &#8220;partial&#8221; information (that you may or may not Ajax into the page instead of doing a  whole new page view for) can be indexed as just that partial content instead of as a complete page.</p>
<p>Google is not concerned about whether you are using Ajax or not. They&#8217;re concerned about whether you are displaying relevant and indexable content in a way that their search bot can easily access or not. So, they responded by giving you a set of guidelines by which you can make such usage more SEO friendly. Google wants access to that individually indexable content just as much as you may want the SEO juice of having more of your site&#8217;s content being indexed.</p>
<p>Take Twitter for example. Individual tweets and user profiles are all unique pieces of content that should be separately indexable. For them, if they are going to Ajax&#8217;ify the display of all of this content, they definitely need to be aware of how to keep Google able to individually access this content. Of course, Google could very well just index the entire page of tweets. But this leads to less robust indexing than if Google is able to individually access and index each distinct piece of content.</p>
<h3>return;</h3>
<p>Accessibility, SEO, and Ajax/JavaScript are three distinct practices that all modern web sites and developers should have strategies for. Combining those efforts may seem expedient, but it often leads to more confusion and failure to achieve the goals of any of the three. So it&#8217;s important you understand where they overlap and where they are separate, and have a robust strategy for managing each.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.getify.com/seo-that-ajax/' addthis:title='SEO that Ajax&#8230; Ajax that SEO '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.getify.com/seo-that-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Content Delivery Network via getiblog.2static.it

Served from: blog.getify.com @ 2012-05-18 08:12:01 -->
